How to stop background images from repeting

liunx

Guest
hello, i'm having a hard time here trying to stop my image from repeting it self over & over on my page, what i want is the image right smack on the center, without repeting it but as a background.<br />
<br />
when i use <TD Background="image.gif"> all it does is repete itself =( anyhelp would be great.<!--content-->use css (css1...nn4+ ie4+)<br />
background-image:url(image.gif);<br />
background-repeat:no-repeat;<!--content-->and <br />
<br />
background-position:center;<br />
<br />
and by the way you use that like this: (just in case you've not used css)<br />
<br />
<td style="background-image: url("pic.jpg"); background-repeat: no-repeat; background-position:center;"><!--content-->hey thanks for the fast reply, i don't know much about css So i tried what Dave sugguested <br />
<br />
<td style="background-image: url("images/test.gif"); background-repeat: no-repeat; background-position:center;"> <br />
<br />
and now the image won't even show up :x any ideas anyone?<!--content-->try single quotes:<br />
<br />
url('images/test.gif')<br />
<br />
and this may go without saying, but, make sure to close the</td> tag and make sure the cell actually has something in it.<!--content-->Originally posted by hastx <br />
try single quotes Or no quotes at all. But with inline styles don't use double quotes if you are using double quotes with the HTML and don't use single quotes if you are using single quotes with the HTML.From the CSS2 Specification:<br />
The format of a URI value is 'url(' followed by optional whitespace followed by an optional single quote (') or double quote (") character followed by the URI itself, followed by an optional single quote (') or double quote (") character followed by optional whitespace followed by ')'. The two quote characters must be the same.<br />
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/syndata.html#uri">http://www.w3.org/TR/REC-CSS2/syndata.html#uri</a><!-- m --><!--content-->
 
Back
Top