VML background image in table cell - how to fill unknown height?

Hello there,

i'm trying to fill a table cell with a tiled background using

<td width="4" height="100%" valign="top" style="background-image: url('absolute-url-to-image.gif'); background-color: #f4efe9;" background="absolute-url-to-image.gif">
<!--[if gte mso 9]>
    <v:rect style="width:4px;" strokecolor="none">
    <v:fill type="tile" color="#f4efe9" src="absolute-url-to-image.gif" /></v:fill>
    </v:rect>
    <v:shape id="shadow-left" style="position:absolute;width:4px;">
<![endif]-->
<!--[if gte mso 9]>
    </v:shape>
<![endif]-->
</td>

i've read elsewhere that this approach is useless because a height must be set on v:rect... but it takes no percentage value, does it?

thanks for any help in advance!

roshodgekiss roshodgekiss, 4 years ago

Hey there hansspiess    , height="100%" will not work on either in the <td> or in the VML code. You will find that the <td> will only ever be as high as the content therein, unless you set a fixed value :) Our advice would be to either a) use a fixed height for both the <td> and VML, or b) tile the background image in the VML. Hope that helps!


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098