|
Posted by Ben C on 01/19/07 10:42
On 2007-01-19, Robin Rattay <rotora@gmx.net> wrote:
> 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".
You're right, I just read that section again (6.4.3), and everything you
say is correct. I spoke too soon. I also tried it in Opera and Konqueror
and it worked as expected.
[Back to original message]
|