Forum Moderators: open

Message Too Old, No Replies

What is the valid hex value for rgba(0,0,0,0)?

In other words, how do we set transparency with a hex value?

         

JAB Creations

5:51 pm on Feb 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm going off this reference...
[w3.org...]

By having transparency it allows menu items that are expanded on my site to have a third color, in a sense making a visual queue where the user has moved their mouse over.

Currently I receive this validation warning which I feel is a bug...

You have no background-color with your color

I currently have the background attribute set as...

background: transparent;

So in short, how would we set rgba(0,0,0,0) as a hex value?

John

JAB Creations

5:57 pm on Feb 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[w3.org...]

Unlike RGB values, there is no hexadecimal notation for an RGBA value.

I suppose this negates my question in regards to a hex value?

John

encyclo

6:53 pm on Feb 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, sadly there is no way of doing this: it is either "transparent" or nothing. I suppose you could argue that the validator is correct as "transparent" is not a color, and the warning is there because the underlying color may be inappropriate as a contrasting color to your element, especially if a user has overridden background colors in a user stylesheet.

CSS validator warnings are more of a heads-up about the potential for a problem. They are not in themselves a validation issue. I would just ignore this kind of warning other than checking that the potential problem is in fact minimal or non-existent.