View Full Version : Transparent background for text message

08-27-2002, 11:28 AM
I have a javascript message that floats on my page
and the background text color is tranparent so the message doesnt cover up other text when it floats over the other text.

My declaration and setting for background text is:
var backgroundcolor="transparent"

which works in IE but not in Netscape. In Netscape the background color of the text ends up as blue not transparent as it works in IE.

Please advise what or if there is a letter code for tranparent background that Netscape needs or how I can get it to work in Netscape 4.77?

08-27-2002, 11:43 AM
for netscape 4.x the CSS attribute is layer-background-color:

#myDiv { position:absolute; left:10; top: 10; width:100; top:100; clip: rect(0 100 100 0); background-color:blue; layer-background-color:blue }
<div id="myDiv">Hello World</div>

I should point out that you need to include both background-color and layer-background-color to enable cross-browser compatiblity with styling.

Hope this helps.