...

View Full Version : Table Background Tiling



rcarnes
02-01-2005, 04:48 AM
I am working on a website and have a table with some text in it. The table has 3 columns and about 6 rows. I am using Dreamweaver and was playing around and saw that I could set an image as the table background. The only thing is, the image gets tiled in the table. I believe it has something to do with the size of the image and the size of the table because when I put a larger image in there as the background it tiles differently. Is there a way to "stretch" the image so that it fills up the background of the table without tiling ? Here is the HTML code, I don't see anywhere where I could upload the image I'm using, but you can take any image you wish and will see what I'm talking about.

Thanks !

<body bgcolor="FFFFCA">
<div align="center">
<table width="100%" border="0" background="../Images/hole10b_popup_bg.jpg">
<tr>
<td height="24" colspan="3"><strong><font size="+1" color="#FFFFFF"><em>Ocean
County Golf Course At Atlantis</em></font></strong><font color="#FFFFFF" size="+1"><em><strong>2004
Rates </strong></em></font></td>
</tr>
<tr>
<td width="27%"><div align="center"></div></td>
<td width="35%"><div align="center"><font color="#FFFFFF">Resident Rates </font><font size="+1">*</font></div></td>
<td width="38%"><div align="center"><font color="#FFFFFF">Non-Resident Rates</font></div></td>
</tr>
<tr>
<td><div align="center"><font color="#FFFFFF">Weekday AM</font></div></td>
<td> <div align="center"><font color="#FFFFFF">$18</font></div></td>
<td><div align="center"><font color="#FFFFFF">$35</font></div></td>
</tr>
<tr>
<td><div align="center"><font color="#FFFFFF">Weekday Senior/Student</font></div></td>
<td><div align="center"><font color="#FFFFFF">$15</font></div></td>
<td><div align="center"><font color="#FFFFFF">$28</font></div></td>
</tr>
<tr>
<td><div align="center"><font color="#FFFFFF">Weekday Twilight</font></div></td>
<td><div align="center"><font color="#FFFFFF">$12</font></div></td>
<td><div align="center"><font color="#FFFFFF">$20</font></div></td>
</tr>
<tr>
<td><div align="center"><font color="#FFFFFF">Weekend AM</font></div></td>
<td><div align="center"><font color="#FFFFFF">$24</font></div></td>
<td><div align="center"><font color="#FFFFFF">$42</font></div></td>
</tr>
<tr>
<td><div align="center"><font color="#FFFFFF">Weekend Twilight</font></div></td>
<td><div align="center"><font color="#FFFFFF">$16</font></div></td>
<td><div align="center"><font color="#FFFFFF">$24</font></div></td>
</tr>
<tr>
<td height="28" colspan="3">&nbsp;</td>
</tr>
<tr>
<td height="28" colspan="3"> <div align="center"><strong><font color="#FFFFFF" size="+1">*</font></strong><font color="#FFFFFF">
Ocean County Parks and Recreation Golf ID Card is <strong>REQUIRED</strong></font></div></td>
</tr>
<tr>
<td height="27" colspan="3"> <div align="center"></div>
<div align="center"></div>
<div align="center"><font color="#FFFFFF">Call course at <strong>609.294.1032</strong>
for updated rates and further info </font></div></td>
</tr>
</table>
</div>
<p align="center">
<input name="Close_Window_Button" type="submit" onClick="javascript:window.close()" value="Close Window">
</p>
<p align="left">&nbsp;</p>
</body>

jdiben
02-01-2005, 03:41 PM
Use CSS to set the background image and you can include repeat style

replace
<table width="100%" border="0" background="../Images/hole10b_popup_bg.jpg">

with
<table style="background-image: url(../Images/hole10b_popup_bg.jpg);background-repeat: no-repeat; width:100%">

Joe

rcarnes
02-01-2005, 04:14 PM
Thanks Joe, that did the trick, I still needed to play around with the image size though because I am using a javascript to put up a popup that this table will go in. I got it working though, Thanks !

Reid



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum