|
Posted by Andy Dingley on 06/08/06 09:14
Vlatko Juric-Kokic wrote:
> The validator gives warning "you have no background-color with your
> color" for several elements. But I specifically put in
> "background-color: transparent", which is allowed/required according
> to CSS 2.1:
Note that this is only a warning, not an error. Your CSS is still
valid, even if you omit background-color altogether. The risk is that
if you're setting just one colour of the colour combination, then in
some arrangements of HTML and CSS it's possible you could place this
new foreground colour over a background of the same colour (set by a
different CSS rule) and so would have your text disappear. Obviously a
background colour of "transparent" does nothing to avoid this problem.
It's only a warning - you can (and often should) ignore it. In many
cases you're mixing colour settings such as varying background colours
on the rows of a table and text colours for different columns or
particular highlights. CSS checking will give you a warning (it can't
_prove_ that the text will always be visible) but you, at a higher
level as the page designer, still know that it's safe.
Navigation:
[Reply to this message]
|