CSS transparent

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Greetings One and All

xxx {color: transparent;} is a perfectly valid construct in CSS.

However the validator throws a paddy when using ...

xxx {border: thin solid transparent;}

is this a /real/ error (whatever that means) or can I ignore it assuming  
the browsers (and validators) will eventually catch up.

Pity if it is - almost seemed an elegant solution (works in Opera, slight  
glitch in ff, hopeless in IE)

William Tasso

Save the drama
for your Mama.

Re: CSS transparent

Deciding to do something for the good of humanity, William Tasso

Quoted text here. Click to load it

http://www.w3.org/TR/CSS2/box.html#propdef-border seems to indicate it
*is* an error - the colo[u]r must be a colo[u]r as defined in

OTOH, http://www.w3.org/TR/CSS2/box.html#border-color-properties says
that you *can* use transparent for border-color (though not for
border-top-color et al).

xxx {border: thin solid transparent;}
is not valid, while
xxx {border-width: thin; border-style: solid; border-color:
*is* valid. An error in the specs, IMO.

Which, on further investigation, seems to have been corrected in CSS 2.1
- transparent is valid for any of the various border properties. So it
depends what version of CSS the validator is checking it against. :-)

Mark Parnell
Att. Google Groups users - this is your last warning:
http://www.safalra.com/special/googlegroupsreply /

Re: CSS transparent

On Tue, 13 Dec 2005 21:46:28 -0000, "William Tasso"

Quoted text here. Click to load it

background-color: transparent;
is a valid construct of the form "<color> | transparent"
i.e. either a color value _or_ the value "transparent".  
This doesn't mean that "transparent" is one of the valid values for

In other cases (including AFAIR, the color propertyitself) only the
<color> values are permitted, not transparent.

Site Timeline