Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape CSS Positioning

Status
Not open for further replies.

JavaDude32

Programmer
Aug 25, 2001
180
US
I have this code:

Code:
<html>
<body>
<div style=&quot;position:absolute; color:white; background-color:transparent;&quot;>THE TEXT ON THE IMAGe
</div>
<img src=&quot;blackness.bmp&quot;>
</body>
</html>

Now IE renders the Text just fine, but Netscape does not. Netscape places the Text below the image. Can anybody help me with this please?
 

1) Set a z-index.

... or ...

2) Make the image a background of the DIV.

HTH.
 
Thanks, I didn't even think of that, I just modified the tags that were already there. Although any idea why it doesn't work this way in Netscape\Mozilla?
 
PS I thought Netscape didn't have the z-index attribute?
 
Maybe you need to specify a location for the div. It's absolutely positioned, but you're not specifying where it should be. Netscape is therefore placing it for you, but not where you expect it to go. Try giving it a &quot;top: 0; left: 0&quot; in the style.

 
Hmm, IE not working to specs, surprise surprise. This works okay if you specify the absolute location using top and left. Netscape assumes at the bottom and IE assumed on the image itself, kinda strange.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top