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!

Placing text on an image

Status
Not open for further replies.

bongmarley

Programmer
Oct 21, 2002
74
CA
I want to know if it is possible to place text on an image thru code. Also I want to be able to specify the location of the text on the image.
I have a floor plan of a school. I want to be able to display the number of students in each room by placing that number in the top left corner. How do I go about this
 
Hi,

Put the pictures in a table then make a <DIV> and use CSS to specify if you want it to be relative to the table or absolute to the page, set the size, and the placement and that's it.

Eg:
<DIV STYLE=&quot;position:relative; width: 10; height: 10; top: 0px; left: 30px; z-index: 1;&quot;>YOUR TEXT AND/OR IMAGE AND/OR ANYTING ELSE HERE FOR THE LAYER</DIV>

If you use multiple <DIV>'s then you will want to change the z-index of each one. You can have <DIV>'s layered on top of <DIV>'s but you do that by way of the z-index. That specifies the layer order: 1 being the first layer on the page and infinity being the highest layer on the page.

Hope this helps!
relax.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top