HTML Table Image

liunx

Guest
How do you get a Background image not to repeat inside a table?<!--content-->Are you using the backgroud image in a table cell or as a background for the entire table?<br />
<br />
You could accomplish this using stylesheets and creating a class for the table cell or table you to which you want the background applied.<br />
<br />
If you do this, then you want the following within your stylesheet declaration <br />
<br />
background-repeat: no-repeat;<br />
<br />
Also, stylesheet elements are supported differently by IE and Netscape. You'll want to check to make sure what you are trying to accomplish works in both browsers.<br />
<br />
If you are calling the image as the background to a td, then an easy fix is to make sure that the image and the table cell are fixed at the same size.<br />
<br />
-beth<!--content-->Backgrounds work better for cells so when I want a table background I generally nest it inside a single cell table:<br />
<br />
<table border="0"><br />
<tr><br />
<td style="background-image:url(image.jpg);background-repeat:no-repeat"><br />
<!--table with whatever definition you need. Default background is transparent, so the background of the cell shows through.<br />
--><br />
</td><br />
</tr></table><!--content-->
 
Back
Top