Cascading Style Sheets Tutorial

Css based on the background of conversion and js

  <SCRIPT Language=JavaScript> … 

  <! - ———————————————- ——— -> 
  <! - StyleSheet Selector - (c) 2001-2004 qwilk@desktopian.org -> 
  <! - ———————————————- ——— -> 

  Var dtoDesign =''; 
  Var search = 'dtoDesign ='; 
  If (document.cookie.length> 0) 
  (… 
  Offset = document.cookie.indexOf (search); 
  If (offset! = -1) 
  (… 
  Offset + = search.length; 
  End = document.cookie.indexOf (";", offset); 
  If (end == -1) = document.cookie.length end; 
  DtoDesign = (unescape (document.cookie.substring (offset, end))); 
  ) 
  ) 

  If (dtoDesign == "green") document.write ( "<link rel='StyleSheet' href='/css/dto_green.css' type='text/css'>"); 
  Else if (dtoDesign == "blue") document.write ( "<link rel='StyleSheet' href='/css/dto_blue.css' type='text/css'>"); 
  Else if (dtoDesign == "red") document.write ( "<link rel='StyleSheet' href='/css/dto_red.css' type='text/css'>"); 
  Else if (dtoDesign == "brown") document.write ( "<link rel='StyleSheet' href='/css/dto_brown.css' type='text/css'>"); 
  Else if (dtoDesign == "grey") document.write ( "<link rel='StyleSheet' href='/css/dto_grey.css' type='text/css'>"); 
  Else if (dtoDesign == "coolblue") document.write ( "<link rel='StyleSheet' href='/css/dto_coolblue.css' type='text/css'>"); 
  Else if (dtoDesign == "wcam") document.write ( "<link rel='StyleSheet' href='/css/dto_wcam.css' type='text/css'>"); 
  Else document.write ( "<link rel='StyleSheet' href='/css/dto_wcam.css' type='text/css'>"); 

  Function SelectDesign (name) 
  (… 
  If (name == "Green") document.cookie = "dtoDesign = green; expires = Saturday, 16-Apr-11 00:00:00 GMT"; 
  If (name == "Blue") document.cookie = "dtoDesign = blue; expires = Saturday, 16-Apr-11 00:00:00 GMT"; 
  If (name == "Red") document.cookie = "dtoDesign = red; expires = Saturday, 16-Apr-11 00:00:00 GMT"; 
  If (name == "Brown") document.cookie = "dtoDesign = brown; expires = Saturday, 16-Apr-11 00:00:00 GMT"; 
  If (name == "Grey") document.cookie = "dtoDesign = grey; expires = Saturday, 16-Apr-11 00:00:00 GMT"; 
  If (name == "CoolBlue") document.cookie = "dtoDesign = coolblue; expires = Saturday, 16-Apr-11 00:00:00 GMT"; 
  If (name == "WinterCamouflage") document.cookie = "dtoDesign = wcam; expires = Saturday, 16-Apr-11 00:00:00 GMT"; 
  Window.location.reload (); 
  ) 

  <! - ———————————————- —- -> 

  Function addSPanel () (… 
  If ((typeof window.sidebar == "object") & & (typeof 
  Window.sidebar.addPanel == "function")) 
  (… 
  Window.sidebar.addPanel ( "dto Search" 
  "Http://desktopian.org/q/searchtab.shtml ","");// search 
  ) 
  Else 
  (… 
  Alert ( "Your browser does not appear to have a sidebar! Download Mozilla!"); 
  ) 
  ) 
  </ SCRIPT> 
  <! - ———————————————- —- -> 
  <META Content="MSHTML 6.00.2900.3059" name=GENERATOR> </ HEAD> 
  <BODY text = # # ffffff vLink 57af74 aLink = = = 57af74 link # # # 053015 = 57af74 bgColor 
  TopMargin = 5> 
  <TABLE Width="100%"> 
<TBODY>
<TR>
  <TD Align=right> </ TD> </ TR> </ TBODY> </ TABLE> 
  <TABLE CellSpacing=10 cellPadding=0 width="100%" border=0> 
<TBODY>
<TR>
  <TD VAlign=top align=left> <! - ————————————- ———————– -> 
  <TABLE CellSpacing=0 cellPadding=0 width="100%" border=0> 
<TBODY>
<TR>
  <TD Class=upperleft2> <IMG 
  Src = "desktopian_org climbing the path to desktop perfection.files / fill.gif" 
  Width = 4> </ TD> 
  <TD Class=lowerfill> <IMG height = 6 
  Src = "desktopian_org climbing the path to desktop perfection.files / fill.gif" 
  Width = 10> </ TD> 
  <TD Class=lowerfill> <IMG 
  Src = "desktopian_org climbing the path to desktop perfection.files / fill.gif"> </ TD> 
  <TD Class=lowerfill> <IMG height = 6 
  Src = "desktopian_org climbing the path to desktop perfection.files / fill.gif" 
  Width = 10> </ TD> 
  <TD Class=upperright2> <IMG 
  Src = "desktopian_org climbing the path to desktop perfection.files / fill.gif" 
  Width = 4> </ TD> </ TR> 
<TR>
  <TD Class=fill colSpan=5> <IMG 
  Src = "desktopian_org climbing the path to desktop perfection.files / fill.gif"> </ TD> </ TR> 
<TR>
  <TD Class=sidefill colSpan=2> <IMG 
  Src = "desktopian_org climbing the path to desktop perfection.files / fill.gif"> </ TD ><!– ———- -> 
  <TD Class=links align=left> <! - ———- -> 
  <TABLE CellSpacing=0 cellPadding=0 width="100%" border=0> 
<TBODY>
<TR>
  <TD Class=left rowSpan=2> 
<TABLE>
<TBODY>
<TR>
  <TD Class=logo> <A href = "http://desktopian.org/" 
  Target = _top> <IMG height = 76 
  Src = "desktopian_org climbing the path to desktop perfection.files / fill.gif" 
  Width = 378 align = absMiddle 
  Border = 0> </ A> </ TD> </ TR> </ TBODY> </ TABLE> </ TD> 
  <TD Class=topright> 
  <SCRIPT Language=JavaScript> … 
  Function addPanel () (… 
  If ((typeof window.sidebar == "object") & & (typeof 
  Window.sidebar.addPanel == "function")) 
  (… 
  Window.sidebar.addPanel ( "Desktopian" 
  "Http://desktopian.org/why/mozilla_sidebar.php ",""); 
  ) 
  Else 
  (… 
  Alert ( "Your browser does not appear to have a sidebar! Download Mozilla!"); 
  ) 
  ) 
  </ SCRIPT> 

  Quoted by: 
<A
  Href = "javascript: SelectDesign ( 'Green')">< IMG 
  Style = "BACKGROUND-COLOR: # 558065" 
  Alt = "* is * The grass greener on the other side!" 
  Src = "desktopian_org climbing the path to desktop perfection.files / dsgn_green.gif" 
  Align = absMiddle border = 0> 
  </ A> 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • DotNetKicks
  • DZone

Tags: Background Attachment, Background Color, Background Image, Background Position, Background Repeat, div background

Releated Posts

  • Using ASP + CSS Random background
  • Using ASP + CSS realize website random background
  • CSS graded in the background as well as to the use of matters
  • CSS and C # deformation background pop-up dialog box
  • Css background forms used to achieve transparent, opaque content

This entry was posted on Monday, December 31st, 2007 at 12:00 am and is filed under Css+Div Web Design. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« Css, and the definition of operating rules
Css Notes (1) »

Leave a Reply

  • Categories

    • CSS Properties (491)
    • CSS Tutorial (1154)
    • CSS Tutorial By Examples (1201)
    • Css+Div Web Design (3274)
    • Xhtml and Web Design (1797)
  • Archives

    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
    • September 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • April 2007
    • March 2007
    • February 2007
    • January 2007
  • Pages

    • About us

Cascading Style Sheets Tutorial