[thelist] CSS: Why does this work?

Anthony Baratta anthony at baratta.com
Tue Apr 6 10:43:44 CDT 2004


At 06:28 AM 4/6/2004, Rob Smith wrote:

>   Why does the div work when you enter either "test a" or just "a" in the
>class field? As a random test, "cow a" works too.

Because you are "stacking" styles. If you want to add different styles to 
an element and don't want to create a new style with all the attributes, 
just add them in a space separated list.

In your example, you are trying to apply class test and class a, but test 
doesn't exist so it's ignored.

---
Anthony Baratta
President
Keyboard Jockeys

"Conformity is the refuge of the unimaginative."



More information about the thelist mailing list