Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Thanked 0 Times in 0 Posts

    Transparent background for text message

    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?

  • #2
    Regular Coder martin_narg's Avatar
    Join Date
    Jul 2002
    Chamonix, France
    Thanked 3 Times in 3 Posts
    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.

    "Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
    and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
    -Tommy Cooper


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts