HaLe Blog twitter
HaLe Blog Rss

Outlook 2007 e-mailing hell – eat div

Posted by hho | Posted in Coding, Harald Hoffelinck, HTML / CSS | Posted on 15-01-2009

7

We had to make an HTML mailing for a client. Enters our problem : Outlook 2007. So you thought you could use divs with fixed widths and background colours. Forget all about it, in fact, forget all about css based design.

Instead, use… tables.

In pre-school we were all taught “Tables are evil”, and should only be used for tabular data (duh). Thank you Bill, we’re back to square 1.

Let’s say you would like a red border around the  500 px wide content of your html mail, common sense tells us to use a div. However, our “favourite” e-mail program shows us it can’t be done. It joyfully extends the width of the div to the whole screen width.

So, the solution is to go back to some old-school table based html code, the nightmare !!!

In fact, we can forget about a lot of common html goodies, like background images, css floating or positioning.

So, the number one advice is : make sure you get a well designed html mailing that is both attractive to your customer, and plays nicely with e-mail clients, how good or how bad they are.

PS : don’t trust wysiwyg editors, trust notepad.

Comments (7)

From what I’m reading, Micr0s0ft has decided to use the Word 2007 parsing engine in Outlook 2007, instead of IE. Basically they are using a [probably prehistoric] engine to bypass IE exploits which could migrate to Outlook too. What a decision! Tables are evil and IE is too :)

Hi Joni,

What you’re saying is correct. After some research I’ve done I also read about the deprecated Outlook HTML Email rendering engine.

My thought is they ought to use the standard, IE 7 engine to render HTML email(which is most likely present on most XP / Vista machines).

Hopefully the future will bring “soelaas” ;-)

/Kim

So its 2011 and we STILL cant use divs to display in outlook??

Would appreciate a reply for anyone else who feels they have to resort to tables after failing with div.

@J8
I was resorting the last 2 hours ;-)

m usin Tables fm last 6 months…DIVs dont wrk!

I am going to resort.. :|

Same here. Table borders don’t draw in the same way though so totally stumped. Nice to see other people just as mad at MS about this though…

Write a comment