views:

216

answers:

1

I'm trying to create an HTML email that will display properly in all widely used email clients. I'm wrapping the whole email in a table, and I'd like it to have a width that is up to 98% of the available width, but no greater than 800 pixels. Like this: <table style="width:98%; max-width:800px;">

But I'm not doing it that way, since according to this Outlook 2007 does not support the CSS width property.

Instead, I'm doing this: <table width="98%">

Is there any way to also set a max-width without relying on CSS?

+4  A: 

The short answer: no.

The long answer:

Fixed formats work better for HTML emails. In my experience you're best off pretending it's 1999 when it comes to HTML emails. Be explicit and use HTML attributes (width="650") where ever possible in your table definitions, not CSS (style="width:650px"). Use fixed widths, no percentages. A table width of 650 pixels wide is a safe bet. Use inline CSS to set text properties.

It's not a matter of what works in "HTML emails", but rather the plethora of email clients and their limited (and sometimes deliberately so in the case of Gmail, Hotmail etc) ability to render HTML.

Diodeus
Yeah, that's kind of what I expected, but I figured I'd ask.
Tim Goodman