HomeContact
Computerz
Using vertically tiling background images for tables and tables cells in outlook 2007 and outlook 2010 to make fancy e-mail newsletters
René Dohmen
October 10, 2013
1 min

After a whole day of searching the internet why tiling background won’t show up in a e-mail template when viewing the mail in Outlook 2007 or Outlook 2010 I finally found the answer on stackoverflow.

The funny thing is that repeating background work in Outlook 2003, Outlook 2000, Gmail and in all the other e-mail clients that we test our mailinglist templates with. Although it seems that background images don’t work in Lotus Notes; is somebody still using this? ;)

We did test a big scala of approaches; pictures in a div, inline styling, relative placement of transparant overlay, vxml hook with fixed size, size in percentages, etc.

The solution is actually quite easy. In the cell that opens your current background shizzle add:

Then at the end of the cell, where you want your background to stop:

You can find an easy complete example on stack overflow, copy pasteable:

We found some other weird issues/behaviours while testing our mail in some webclients like Gmail en Hotmail. Webmail clients can have line-height definitions that overrule line-heights! Outlook appears to skip background for table cells completely; so we often use a table cell containing an img element and a background image for the cell. Gmail and other clients will load the background; Outlook 2007 en Outlook 2010 will load the image element. This can get you in problems when content pushes the height of the cell above the image element height. You will get missing gaps in the content.

The problem: The browser already has previous line-height definitions from rendering the Gmail layout; it will/can apply this line-height on your cells. To avoid this we sometimes apply a fixed line-height to “design cells”.

An example:

In Hotmail, Outlook.com and Gmail: it would create a table cell with height=18 instead of the wanted and expected 10. The style=“line-height: 71%;” will, forcefully correct that. Better suggestions are welcome.


Related Posts

Working with git submodules
October 15, 2023
3 min
© 2024, All Rights Reserved.
Powered by formatics

Quick Links

Advertise with usAbout UsContact Us

Social Media