On 27 Feb 2008, at 16:55, Michael Horowitz wrote:

Just inherited a site and saw pages with multiple style sheets. Is there a reason for that and how does the browser determine what to use if there is a conflict

Michael, I assume that you mean that the page referenced several external stylesheets using multiple <link> tags?

I /believe/ that the browser simple loads them one after the other in the order that they appear in the source (unless the stylesheet's rel is marked up as being 'alternate'), with one stylesheet being appended to the end of the previous one. In effect the browser sees one big stylesheet.

As for conflict resolution, my understanding is that the normal rules of CSS inheritance apply.

Eg.
You have source:

<link rel="stylesheet" type="text/css" href="styles_A.css" />
<link rel="stylesheet" type="text/css" href="styles_B.css" />
<link rel="stylesheet" type="text/css" href="styles_C.css" />

In the CSS:

styles_A contains the rule:
        body { background-color: white}

...and...

styles_B contains the rule:
        body { background-color: red}

then the page's background colour would, rather unpleasantly, be red.
I think that's right...

--
Rick Lecoat



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to