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

Text over image, CSS 1

Status
Not open for further replies.

JCrou82

Programmer
Aug 23, 2002
265
US
I need to be able to have text on top of an image (.jpeg). I've attempted to use z-index attribute but it does not seem to work at all. Does anyone know how to do this?

thanks in advance
 
Hi,

Play around with this:

<HTML>
<HEAD>
<TITLE>DIV</TITLE>
<STYLE TYPE=&quot;text/css&quot;>
div.text
{
position: absolute;
left: 35px;
top: 35px;
z-index: 1;
color: #CCFF00;
font-family: Verdana;
font-size: 10px;
font-weight: bold;
}
</STYLE>
<BODY>
<IMG SRC=&quot;image.jpg&quot;>
<DIV CLASS=&quot;text&quot;>
TEXT OVER THE PICTURE TEXT OVER THE PICTURE TEXT OVER THE PICTURE TEXT OVER THE PICTURE TEXT OVER THE PICTURE</DIV>
</BODY>
</HTML>

Hope this helps!
relax.gif

 
Thank you spyderix. It worked like a charm. Hopefuly my client will like this since I've used other methods and none were accepted.

Again thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top