Best practice for image padding in Outlook 2007

It feels like I've tried countless variations of CSS to get consistent padding on images in Outlook 07 and I'm wondering if anyone has a sure-fire way to ensure that images aligned left or right can have padding.

My latest version:

<img class="right" align="right" src="">

img.right {
   display: block;
   float: right;
   margin: 0 0 20px 20px;
}

isn't cutting it.

I'd be grateful for any insights.

Cheers,

Alex

fyredefyre fyredefyre, 7 years ago

Just a thought, you could try adding vertical and horizontal spacing instead with even values - could save you some time.


www.phenom.com.au - Everything Email.
Email: jordan.hunt@phenom.com.au Skype: fyredefyre
AlexDunae AlexDunae, 7 years ago

Thanks for the reply, thought I'm not totally sure I follow.

Do you mean adding spacing to the image file itself?  I'm hoping to avoid that if possible.

fyredefyre fyredefyre, 7 years ago

For example you could set: <img src="image.jpg" width="100" height="100" hspace="5" vspace="5" />

And yes, this would set spacing to the image itself. Unfortunately this has to be set manually so doesn't answer your question entirely but perhaps someone can suggest a better solution.


www.phenom.com.au - Everything Email.
Email: jordan.hunt@phenom.com.au Skype: fyredefyre
BThies BThies, 7 years ago

hspace and vspace don't work in all email clients.

Try adding a border to the img itself.  For instance:

<img src="image.jpg" width="100" height="100" style="border:10px solid #FFFFFF;">

In addition, if you wanted to just add spacing to the left and right:

<img src="image.jpg" width="100" height="100" style="border-right:10px solid #FFFFFF; border-left:10px solid #FFFFFF;">


Brian Thies
Professional Email Developer
Thies Publishing

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