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

Text on images?

Status
Not open for further replies.

malachi083

Programmer
Sep 17, 2001
2
US
Hi, I was curious if there were a way to put text on top of an image? (Like a menu for a diner with specials for each day having a different rectangle background)

I already have the images (backgrounds made in illustrator) and I could write the text on them there and just make it one image, but since I will be changing these quite often it seemed it would make more since if I could just put an the images where I want on the website and throw something like a table on top and just go in and change what text I want on top without effecting what is beneath it.

Thanks
 
Many ways, with layers and absolute positioning and z-index...but probly the easiest if you are using tables for layout. Specify a cell <td> background with your picture, then type the text in the cell

<td background=&quot;images/mypicture.gif&quot;>This is todays special!</td>

Be carefull of image tiling (image will repeat itself untill the whole area of the cell <td> is filled DeZiner
gear.gif width=45 align=left
When the gears stop turning,
we all stop learning.
 
I did this with one of my sites. (i've been here looking for help with some other stuff on this site, so let me know if you encounter problems, please!) The large soccer balls are inserted as a div background image. I then added the text to the div. To see how I did it, view the source code beginning at: <!--RIGHT ALIGNED BALL BOX DIV BEGIN--> Using CSS positioning, you can place the image just about anywhere and even place images over the background (&quot;new&quot; or &quot;hot&quot; flags, for instance) good luck!
:eek:)
 
HTML tables over a background image is easiest, but using absolute positioning in CSS isn't too hard either.

Here's a site that positions both text and images over a background image using CSS -- check out the source code.



Disclaimer: This is not an &quot;official&quot; UCLA School of Law webpage. It's just a mock-up that I created to show some new design ideas.

Good Luck!
 
Cross reference your work in Netscpae (of you care about those users) using css or div DeZiner
gear.gif width=45 align=left
When the gears stop turning,
we all stop learning.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top