开发者

How to do background-repeat in an HTML email that works in Outlook 2007?

I am constructing a HTML email for clients and would like to have a content area that expands to fit the text. I 开发者_JS百科would like the border of the container to have a shadow effect- which means repeating a 1px image vertically down each side. I have been very careful to use well-supported (and often legacy) tags and stylings so that it displays correctly in as many email clients as possible. However, I cannot get background-repeat working in Outlook 2007. I have also tried setting its height to 100% with mixed results.

I'm actually using the background attribute in a td at the moment as the background styling did not work at all for popular clients (gmail, thunderbird). Can anyone think of a workaround I could use?

If not, is there a way to detect if an email is being displayed in Outlook 2007 so that I could look into removing shadow images for the entire email?

Many thanks


This should work:

background-image: url('/bg.jpg');
background-repeat: repeat-y no-repeat;
background-position: top center;
background-color: white;

Notice the repeat-y and no-repeat. You need both or Outlook 2007 will assume repeat-x too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜