Forum Moderators: phranque

Message Too Old, No Replies

I have an odd coding question about tables.

Please help!

         

naitsirhc26

2:28 am on Jul 24, 2006 (gmt 0)

10+ Year Member



This is the coding that I have for the table:

<table width="100%" border="0">
<tr>
<td background="images/horizontaldividerforlisting.gif">&nbsp;</td>
</tr>
</table>

My question is that I would like to make it so the background images width is also 100%. Right now, it just repeats. Is there any way to make the image divider stretch? I don't want it to repeat, or it will look ugly. I have to be able to type on top of the image.

le_gber

8:47 am on Jul 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



try:

<html>
<head>
<style>
.bgcell{
background: #fff url(images/horizontaldividerforlisting.gif) top left norepeat
}
</style>
</head>
<body>
<table width="100%" border="0">
<tr>
<td class="bgcell">&nbsp;</td>
</tr>
</table>
</body>
</html>

the code between the <style tags is called CSS.

CSS Explanation:

background: #fff url(images/horizontaldividerforlisting.gif) top left norepeat

background property white color path of the image position of the image within the element if you want the image to repeat or not