Posted by Ben C on 01/18/07 22:57
On 2007-01-18, dfloss <dfloss@imap.com> wrote:
> given this css:
>
> .no_left_border {border-left: 0px solid}
> table td {border-left: 1px solid}
>
><td class="no_left_border"> <-- doesn't work -->
><td style="border-left: 0px solid"> <-- works -->
>
> Can someone explain the behind the scenes reasons?
table td is more "specific" than .no_left_border, so wins. But the style
attribute is more specific still.
See http://www.w3.org/TR/CSS21/cascade.html, particularly 6.4.3
"Calculating a selector's specificity".
[Back to original message]
|