...

View Full Version : CSS Transparent Colour is BAD???



jlhaslip
09-14-2007, 02:21 AM
li a:link {
color: #cccccc;
background-color:#transparent;
padding: 2px ;
}


The CSS Validator over at the W3C is throwing a wobbly at this transparent background colour for a set of links over top of a gradient background image. I need the transparent background so the Image shows through it, but the validator says it needs a Hex code???

Anything I should worry about???

harbingerOTV
09-14-2007, 02:44 AM
it's a warning for accessibility. basically it asks you to make sure that you have enough contrast in your page. run it through mikes cool app and judge if it's enough:

http://www.graybit.com/main.php

felgall
09-14-2007, 02:48 AM
The # shouldn't be there as it is a named colour and not a hex code.

PremiumBlend
09-14-2007, 02:49 AM
background-color:#transparent;


I always thought it should be:



background-color: transparent;


Why the use of #?

harbingerOTV
09-14-2007, 02:54 AM
oh snap didnt notice the # ;)

PremiumBlend
09-14-2007, 03:19 AM
Oh snap, I thought I was gonna learn something new.

harbingerOTV
09-14-2007, 04:15 AM
as it goes OT..
you snapped my snap

i owe you one ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum