Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Workaround for Outlook 2007 for wrapping text around image with margin?

As we all know, Outlook 2007 uses the Word 2007 rendering engine, causing endless grief when designing HTML email message. [Insert rant here] In particular, float, margin, and padding are - shall we say? - poorly supported.

To simulate float so that text wraps around an image, apparently we can simply use:

<img src="foo.png" align="right">

The issue is padding/margin. Without padding/margin, the wrapped text butts up against the image which looks goofy. One workaround is to edit the image and add transparent framing that simulates margin.

Does anyone know any other workarounds?

like image 915
David Weinraub Avatar asked Apr 24 '10 09:04

David Weinraub


2 Answers

After reading Microsoft's documentation on Outlook 2007 support, I found that using hspace on an image will work to create white space around it similar to padding.

[ img src="image.jpg" align="left" border="0" hspace="10" ]

That will give you the equivalent of 10px of padding. Works pretty well across email clients.

Figured I'd share in case someone else Googling the issue stumbles across this question like I did.

like image 185
lawless Avatar answered Sep 18 '22 16:09

lawless


I have tried it this morning and sadly borders on images arnt supported, however, you can implement the concept on the text area :).

border-left: 7px solid #fff;

for example, inside a white container would give the visual effect of left padding....

like image 27
Darren Westall Avatar answered Sep 19 '22 16:09

Darren Westall