Previous Message
Next Message

Two style sheets?

Sent by Philippe Wittenbergh on 27 March 2008 05:05


On Mar 27, 2008, at 1:59 PM, Marcy Schaller wrote:
> Can two style sheets be applied simultaneously to the same markup?

Sure; 2, 3 , 4, ... the sky is the limit.

> I have a "general" style sheet for a friend's website that  
> standardizes
> the look of all her pages. One of her pages has some unique layout
> requirements that I'm thinking of putting into a separate style sheet.
>
> If I list the general style sheet first, and then the one specific for
> the unique page, am I correct in thinking that both will be applied,  
> and
> that any tag's styles in the second sheet will supersede its styles in
> the first?

In general, yes. It might be good to make sure that the selectors in  
the second stylesheet have a higher specificity.
An easy way is add an ID or class to the body tag, and preprend your  
selectors with it
ex.
h3 {color: red} /* very general

page with <body class="my-special-page">
..my-special-page h3 {color:blue}


Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: