L. David Baron wrote:
Thanks, as you've mentioned, my problem is I don't understand the inheritance rules for cascading. I'm not sure why, for instance, theOn Saturday 2002-11-02 11:43 +0000, alias wrote:a.links:link { color: #000000; background-color: transparent;This selector matches any a element that is an unvisited link and has class="links".<div class="links">
<p><a href="http://www.w3.org/TR/1998/REC-html40-19980424/">HTML 4.0 Specification</a>
<p><div class="links"><a href="http://www.w3.org/TR/REC-CSS2/">Cascading Style Sheets, Level 2</a>
</div>
None of these a elements have class="links" on them. Perhaps you want the selector ".links :link" (or ".links a:link") instead? That would match any unvisited link (or a element that is an unvisited link) that is a descendant of an element with class="links".
.links { font-size: 12px; }
attribute is inherited by my <a> and <p> tags inside the <div class="links">, without specifying a class in <a> or <p>, but the a.links and p.links attributes don't seem to get inherited.
