View Full Version : Multiple Style sheets (or disabling a sheet)

06-02-2005, 04:01 PM
Is there any way to use one style sheet for part of a page and another for the rest?

Specifically I have an include (SSI) for a header that I want to use a different CSS than for the rest of the document.

It would be nice to be able to "disable" a style sheet in other circumstances too. I'm guessing the answer is "no" since my google searches have not turned up anything.

06-03-2005, 12:09 AM

if you put the contents of your header in a <div id="header"> and the rest of your page in a <div id="content"> you can write your CSS like this:

#header {background:black;color:white;}
#header h1 {}
#header p {}
#header a:link {}

and for the contents:

#content {background:white;color:black;}
#content p {}
#content p span {}
#content a:link {}
and so on.

You can put the CSS in one stylesheet (better) or use two @import statements or two links to include them.

Disabling a stylesheet is possible with a little JavaScript.

06-03-2005, 01:37 AM
Thanks SPAN!
I think the first part is just what I'm looking for. I'll also look at that javascript, but the others I've seen are "all or nothing".