|
Posted by Robin Rattay on 01/19/07 09:47
Hi,
Jukka K. Korpela wrote:
> Scripsit Ben C:
>
>>> .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 -->
>>
>> table td is more "specific" than .no_left_border, so wins. But the
>> style attribute is more specific still.
>
> Right. So a practical conclusion is that you can affect this by using a more
> specific selector in the first rule, e.g.
>
> table td.no_left_border {border-left: 0px solid}
I need to delurk for a moment, since I'm confused.
I've re-read the CSS specification on specificity, and tested it in FF,
resulting in the conclusion, that ".no_left_border" is more specific
than "table td" (0010 verses 0002). So both examples of the OP should be
showing no border, i.e. "working".
Robin
Navigation:
[Reply to this message]
|