text over images

liunx

Guest
Hi people,<br />
<br />
I was wondering if you could help me solve a little problem. I am trying to create a website for a project that allows me to search a database (which is set up already) and return the findings (which is lines of text) to a page containing an image. However, the text has to be overlayed onto the image. Is it best to do this in the html coding or through the servlet?<br />
<br />
What do you suggest, and how do I go about it?<br />
<br />
Please keep your suggestions in simple terms since I am newbie to html.<br />
<br />
Many thanks in advance,<br />
<br />
Jason<!--content-->Whenever I need to place text over images, I place the image with the, background="TEST.GIF", option in the body or table tag.<br />
<br />
The image should be the same size as the cell <td> or the table <table> itself, or even the size of the entire page <body> if you are designing your pages to a specific size, say 800 x 600. Being the same size will prevent tiling of the image.<br />
<br />
Example:<br />
<table><tr><td width="180" height="100" background="test.gif"></td></tr></table><br />
<br />
The image dimensions equal width="180" height="100" also. <br />
<br />
Hope that helps.<br />
<br />
Mark B<!--content-->It is easy to use tables and background images as MArk B has said. It is more versatile to use style tags to creat layers and layer the text over the images. This way you are not subject to the limitations of table backgrounds, but it is a little more difficult if you don't already know how to use and position layers.<br />
<br />
Kevin<!--content-->Is that supported in all browsers?<!--content-->I believe 4.0+<!--content-->just wanted to add that it is not absolutely necessay(when using the image as a table backround) to make the table match the size of the image. You can set a class for the particular table and specify background to not repeat itself:<br />
<br />
<style type="text/css"><br />
<!--<br />
.TableBg { background-image: url(bgimage.gif); background-repeat: no-repeat; background-position: center }<br />
--><br />
</style><br />
<br />
<table class="TableBg><tr><td> .........<br />
<br />
just in case you do not want to work with layers (which I personally prefer)<br />
<br />
Good Luck!<br />
Cornelius<!--content-->
 
Back
Top