[thelist] CSS: Why does this work?

Richard Harb rharb at earthling.net
Tue Apr 6 10:56:22 CDT 2004

Tuesday, April 6, 2004, 3:28:32 PM, you wrote:


> Good morning, afternoon, evening,

>   <div class="test a">
> 	This is a test.
>   </div>

>   works the same as...

>   <div class="a">
> 	This is a test.
>   </div>

>   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.

That's because you are assigning two classes two the div.
.a is defined, whereas .test is not.

@see http://www.w3.org/TR/html4/struct/global.html#adef-class


More information about the thelist mailing list