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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

an image as foreground 1

Status
Not open for further replies.

davikokar

Technical User
May 13, 2004
523
IT
Hallo, I am trying to place an image above a text. That means to use an image as "foreground" or a text as "backgruond". I know there is the z-index property but it seems to work only with absolute positioning.
What I am trying to achieve is a layout where I can place a letter under a X image wherever I need and it should move with the rest of the content and not stay fixed in specified pixel coordinates.
Do you have any ideas? thanks
 
Using margins should work. Just contain the text in a <span> or <p> block, target it using CSS and then use negative margins to move it behind the image.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top