stylesheet rules order

Giganews Newsgroups
Subject: stylesheet rules order
Posted by:  Jeff (dont_bug_…@all.uk)
Date: Tue, 15 Jan 2008

Often, a page will have more than one stylesheet. Some external and
some embedded.

  If there are multiple rules that have *identical* selectors, will the
last one always take precedence? Any known instances where this is not true?

#section_1 DIV{color: red}
^^^^^^^^^^^^^^
By selector I meant that part. And I mean identical selectors.

  Also, I tend to write in lower case. Is the upper case DIV preferred
to a lower case div in stylesheet syntax? I notice that when you use
javascript to iterate through a stylesheet it always upper cases these.

  Jeff

Replies