Forum Moderators: not2easy

Message Too Old, No Replies

What am I missing here?

         

adb64

8:32 pm on Apr 2, 2006 (gmt 0)

10+ Year Member



I have the following CSS:

#container A {font-weight: bold; color: red;}
.link A {font-weight: normal; color: green;}

And the following HTML:

<body>
<div id="container">
<a href="#">Bold Red Link</a><br>
<div class="link">
<a href="#">Normal Green Link</a>
</div>
</div>
</body>

The 'Normal Green Link' is also displayed bold red, while I would have expected it to be normal font size and green.
What am I missing here?

Thanks
Arjan

DrDoc

8:36 pm on Apr 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Change
.link a
to
#container .link a
.

#container takes precedence over .link otherwise

adb64

8:39 pm on Apr 2, 2006 (gmt 0)

10+ Year Member



DrDoc,

Great, thank you,

Arjan