[thelist] stupid CSS question
rudy
r937 at interlog.com
Wed Nov 28 09:22:50 CST 2001
> That way I could simply change the 6 color classes at the top of
> the stylesheet and presto the whole site goes from blues to reds.
>
> a boy can dream....
hi matt
nothing wrong with that
in fact, here's how to do it the good old fashioned way
put all your colours into a separate style sheet
so, for example, you might create a file called plainwhite.css using
body { color: #000000 ;
background-color: #FFFFFF ; }
a:link,
a:visited { color: #0000FF;
background-color: #FFFFFF; }
a:hover,
a:active { color: #FF0000;
background-color: #CCCCCC; }
and another called screamingyellow.css using
body { color: #00FF00 ;
background-color: #FFFF00 ; }
a:link,
a:visited { color: #000000;
background-color: #FFFF00; }
a:hover,
a:active { color: #FF0000;
background-color: #FFFFCC; }
now, the rest of your style specs go into common.css --
body { font-family: Verdana, Arial, Helvetica, sans-serif ; }
a { font-weight: bold ; }
and then in the page you just link in the common style sheet and one of the
colour ones --
<link rel="stylesheet" href="common.css" type="text/css" />
<link rel="stylesheet" href="plainwhite.css" type="text/css" />
you can then change colours simply by calling in a different colour style
sheet
the specs are additive, and there's no messing around with fancy multiple
classes
helps?
rudy
More information about the thelist
mailing list