user2290579
user2290579

Reputation: 11

<TD> background image should shrink based on text size

I'm new to email design template.

I have a <td> with a background image. e.g.: <td> Background image </td>.

First, I want some text to be appear on the background image. Secondly, this text is dynamic so I want the background image to shrink/resize based on the length of text.

Thanks in advance.

Upvotes: 1

Views: 206

Answers (2)

John
John

Reputation: 12193

The only way to get image backgrounds outside of the <body> tag in Outlook is to use VML.

Check out emailbg.net

I'm not confident that you can set the background image at a percentage, so even though you can adjust your span/div/table to wrap the text, I think the background image will just tile within that element.

Upvotes: 2

Rebule
Rebule

Reputation: 83

try adding span tags just after the td tag and style the span with background and if necessary with a block. As span tags are element specific they will give background only to the text which apperas dynamically. Hope this helps. It would be great if you create jiddle for that.

Upvotes: 0

Related Questions