setting separate cell border colors using css

Giganews Newsgroups
Subject: setting separate cell border colors using css
Posted by:  normunds (nkalnberzi…@yahoo.com)
Date: Thu, 24 Jan 2008

I'm trying to set border of different cells to different color. For
example I use javascript to toggle the class-name "SelectedTab". I'm
using stylesheet as below:
    table.tabs td.SelectedTab {
        border-top: 3px solid green;
    }
    table.tabs td {
        border-top: 3px solid red;
    }

In IE cells are shown with different top border - if the classname ==
SelectedTab it's green and if the class-name gets removed it's red.
However in Firefox I get a strange result of having all top borders of
the same colour - sometimes it's red sometimes green. Moreover if
initially I have different class names for all cells (say
"SelectedTab", no class-name, "SelectedTab", no class-name), I'm
nearly getting the correct behaviour, though sometimes for some cells
the border is half red, half green.

Is this something that's not supposed to work in Mozilla? Or is it
just a buggy implementation?

Normunds

Replies