[thelist] css rendering myths and optimizing

Morgan Kelsey morgan at morgankelsey.com
Wed Mar 13 12:48:01 CST 2002

> > When the external css is read by the
> > browser it displays the last thing it reads first -so last rule read is
> > first rule displayed. is this true?
> Almost! What actually happens is that the style sheet is read from start
> finish and the last declared style is applied. Take this example:
[snip](great example)[snip]

this is why too, when you have to get down and dirty, you can do things like
<td class="some_class" style="background-color : '#dddddd';">

the class from the style sheet will be applied first,
then the style declaration will modify that class

order of the attributes in your HTML doesn't matter
(i keep them like above so as to not get confused!)


More information about the thelist mailing list