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!

I copied this from a webpage that s

Status
Not open for further replies.

samesale

Programmer
Sep 15, 2003
133
US
I copied this from a webpage that says this will add an image to your webpage, but have it appear behind a block of text is by using this handy little piece of CSS. However, it does not work. Please help.

<html>
<head>
<style type=&quot;text/css&quot;>
img.backone
{
position:absolute;
left:0px;
top:0px;
z-index:-1
}
</style>
</head>
<body>

<img src=&quot;knight5a.gif&quot; width=&quot;100&quot; height=&quot;75&quot; class=&quot;backone&quot;>
</body>
</html>
 
It works fine for me in IE under Windows.

It's basically treating the IMG in the same way that we commonly treat DIVs... setting the zIndex to be beneath other elements (in this case, setting the zIndex to be -1 which is less than the body of the page itself).

Have you tried pasting a whole bunch of text after (or even before) the IMG element? I did that, and saw the text appear over the top of the image.

Jeff
 
What browser/version are you using?

There's always a better way. The fun is trying to find it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top