Is it possible to stop repeating background image in a table data (TD) without CSS ?
For example
<table>
<tr>
<td background="http://foobar.com/image.jpg">Some text</td>
</tr>
</table>
I'm looking for a HTML solution, because I'm developing HTML template which will be used for a mail newsletter.
You can append the css to your tag straight in your html code:
<td style="background-image:url(smile.gif); background-repeat:repeat;">
I think there is no way to do that just using html!
Simple answer: No.
Fortunately, most emails you can use inline css styling. As such, I'd try the following and see if it accomplishes what you're looking for.
<td style="background:url(http://foobar.com/image.jpg) no-repeat;">Some text</td>
In the event that fails (as I've seen it do so before), you're only other option is place the image in an <img> tag and manipulate it so it falls underneath the text.
See here for supported CSS attributes: http://www.campaignmonitor.com/css/
Hope this helps.
For maximum compatibility, you should use both inline CSS and the HTML background attribute, as some clients ignore one but not the other.
<td style="background-image:url('http://www.example.com/smile.gif'); background-repeat:no-repeat;" background="http://www.example.com/smile.gif">Some text</td>
Some points to note:
The best way to stop it repeating is simply to make the image much bigger than it needs to be, so that it never needs to repeat.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With