| 
	
 | 
 Posted by Neredbojias on 06/08/06 11:13 
To further the education of mankind, Vlatko Juric-Kokic <vlatko@pcchip.hr>  
vouchsafed: 
 
> I'm fiddling with some pages and went to see whether the CSS will 
> validate. 
>  
> Unfortunately, not. 
>  
> 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: 
>  
> "background-color 
> This property sets the background color of an element, either a 
> <color> value or the keyword 'transparent', to make the underlying 
> colors shine through." 
>  
> So why the warning? 
 
Ah ha, I just got done digging into that somewhat and have discovered some  
interesting tidbits.  First of all, the new validator does not consider  
"transparent" a color.  Many of my previously unwarninged pages were now  
being warned.  This pissed me off.  However, in trying to fix things up, I  
discovered that "inherit" can be used, although maybe not always in the  
same way, to accomplish the desired goal.  I didn't previously realize (or  
such was not the case previously) that "inherit" will allow you to "carry  
forward" a random background _in phase_ with the original regardless of  
where the secondary container lies.  This solves a lot of problems. 
 
In short, after about 2 hours, I had all of my 20 or so affected pages back  
to warningless status.  It _can_ be done, but you might have to change the  
html a little, etc. 
 
--  
Neredbojias 
Infinity has its limits.
 
[Back to original message] 
 |