Previous Message
Next Message

w3 validation: warning 'no background-color with your color'

Sent by Jukka K. Korpela on 18 August 2003 09:09

On Mon, 18 Aug 2003, Jan DeVries wrote:

> as i understand from previous mail i have to set the beackground-color
> for elements for which i've explicitly have set the color. i.e.
> transparent or white if i want to be the same as the background... (if
> background is white of course...)

Yes indeed. And you might set it using
background: transparent
background: white
instead of just setting background-color. It's shorter, and it sets
background-image to none. It's not very likely that a user style sheet or
browser's default style sheet sets a background image for, say, h1
elements. But it's surely possible, and in this case the precaution
actually saves typing.

(The shorthand 'background' _always_ sets all background properties for
the element, either to the specified values, or to the initial values
defined in CSS specifications, such as 'none' for 'background-image'.)

Jukka "Yucca" Korpela,

css-discuss [EMAIL-REMOVED]]
Supported by --
Previous Message
Next Message

Possibly related: