[Wylug-help] Style problem.
Gary Stainburn
gary.stainburn at ringways.co.uk
Thu Mar 1 12:45:33 GMT 2007
On Thursday 01 March 2007 11:45, Smylers wrote:
> Gary Stainburn writes:
> > The code below does exactly what I want it to do. It displays a green
> > box and a brown box, both with white writing in. However, when I try
> > to do this on the page I need it for, I always black writing. Does
> > anyone have any clues why?
>
> Yes. Because on the live page after:
> > td#day54 { color: #ffffff; background-color: #876811;}
> > td#day55 { color: #ffffff; background-color: #72bf44;}
> > <snip>
>
> You then have:
>
> #rostertable a
> {
> display: block;
> text-decoration: none;
> color: #000;
> }
>
> The text in your table cells is all links, so both rules match. Note
> that both that rule and the td#day54 ones match one ID and one element
> name, so they have the same specificity -- which means the latter rule
> is applied and the links turn black.
>
> If you change that to:
>
> color: #FFF
>
> then all links in the table will be white (and you can remove the text
> colour from each separate cell).
>
> If you want the link (text) colour to depend on the background colour
> then make the link text be:
>
> color: inherit;
>
> and it will use whatever is specified as the text colour for the cell as
> a whole.
>
> Smylers
Thanks to both of you for your replies.
The 'color: inherit;' worked.
Cheers
Gary
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
More information about the Wylug-help
mailing list