Sent by David B. Bitton on 15 July 2002 15:03
I'm having peculiar behavior is a CSS stylesheet. I dynamically write out
the contents from a database table. I notice that depending on the order in
which the style classes come out, they may or may not work. Once I add an
ascending sort to the class names as they come out, then everything works
fine.
I thought that perhaps I have some duplication that is being overridden, but
there is only one entry for each class, and then four sub classes, as such:
.Check0 {color: #000000; background-color: #D5FFFF; font: 8pt
Verdana;}
.Check0 A:link {color: #000000; background-color: #D5FFFF; font: 8pt
Verdana;}
.Check0 A:visited {color: #000000; background-color: #D5FFFF; font: 8pt
Verdana;}
.Check0 A:active {color: #000000; background-color: #D5FFFF; font: 8pt
Verdana;}
.Check0 A:hover {color: #000000; background-color: #D5FFFF; font: 8pt
Verdana;}
So, why would it matter if Check0 appears before or after:
.Transaction {color: #FFFFFF; background-color: #657790; font:
8pt Verdana;}
.Transaction A:link {color: #FFFFFF; background-color: #657790; font:
8pt Verdana;}
.Transaction A:visited {color: #FFFFFF; background-color: #657790; font:
8pt Verdana;}
.Transaction A:active {color: #FFFFFF; background-color: #657790; font:
8pt Verdana;}
.Transaction A:hover {color: #FFFFFF; background-color: #657790; font:
8pt Verdana;}
Also, do numbers used in classnames like "Check0" have any effect on
cascading styles? Each class also has a few variations, such as Foo0 and
Foo1. As you may have guessed, they are used for alternating row color.
Thanks. :)
--
David B. Bitton
[EMAIL-REMOVED]
www.codenoevil.com
Code Made Fresh DailyT