Welcome to WebmasterWorld Guest from 54.205.88.118

Forum Moderators: incrediBILL

Transparent color hexadecimal code

   
5:08 am on Oct 21, 2003 (gmt 0)

10+ Year Member



Does anybody happen to know the hexadecimal # for transparent color? I know it is very light grey, but what is the code number?
Donpedro
6:22 am on Oct 21, 2003 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome to the forum, donpedro.

There is no hex code for "transparent" -- every hex code actually is a color. Each pair of "hex code" characters defines an R-G-or-B value.

If you want a transparent color in a CSS rule, you use the word "transparent" -- but that means "don't color the background of this element independently, use the background color of its containing element".

Browsers, by default, use the system background system color when no background color is explicitly declared for the entire body, or when there's an empty window. And by default on most systems, this is a light gray. But both the system default background color and the browser's default background color can be reset by the user.

So you can't depend on the background color being light gray, or any color at all. In fact, I keep my browser default background color set to a light blue. So if I forget to declare a background color in my code, I see that immediately when I test the page.

IE has some proprietary coding that lets you tap into the system color settings, but I've never played around with it. You see the css for it when you save a Word document as HTML (if you ever do such a horrible thing!)

2:54 pm on Oct 21, 2003 (gmt 0)

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



The light gray you're refering to is #C0C0C0, or "silver". But, like tedster said, that has nothing to do with transparency ;)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month