CSS in GMail, Hotmail, etc...

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

CSS in GMail, Hotmail, etc...

Post by alex.barylski »

I'm testing some layouts for a newsletter...

Apparently CSS is not typically respected...especially when it references an external resource, such as an image for background. :P

AM I doing something wrong or is it currently impossible to tile a background image and have it actually appear in GMail or Hotmail or other email clients, other than Outlook?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: CSS in GMail, Hotmail, etc...

Post by Chris Corbyn »

We released a new article recently if you want to have a read:

http://www.sitepoint.com/article/princi ... html-email
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: CSS in GMail, Hotmail, etc...

Post by alex.barylski »

Thanks man. I actually read that article when it first published but only glanced over it. Camp-pain monger is actually an application I keep a very close eye on - they are the leaders in my market. Anyways, very useful resource, I wouldn't have bothered to re-read this article as I skipped the part of interest to me now when I first read it.

Thanks again,

Cheers :)
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: CSS in GMail, Hotmail, etc...

Post by Kieran Huggins »

There's an old article I read that advocated keeping all the style rules inline (inside style="" attributes) for e-mail, otherwise there were always big compatibility problems.

Not sure if it's this one, but it might also be worth a look: http://www.alistapart.com/articles/cssemail
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: CSS in GMail, Hotmail, etc...

Post by matthijs »

Yes, designing HTML email is no fun. Forget clean code. nested tables and lots of inline styles. At least make sure you send a plain-text version along with it, so you know people having problems accessing the html email, can use the plain text version.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: CSS in GMail, Hotmail, etc...

Post by alex.barylski »

It seems that way, yup...

Makes sense too actually, cause if you let CSS and JS into an web based email client...you could possibly rebrand the entire interface from a single email...something I'm sure Hotmail or GMail or Yahoo wouldn't want you to do. :P

I find it ironic though, that I spent so much time learning how to do designs in CSS (and I still don't have it all figured out) and here I am reverting back to my trusty old tables and HTML attributes. Hahaha. At least I know exactly how to hammer out designs without having to ask questions on the forum for table'd designs.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: CSS in GMail, Hotmail, etc...

Post by matthijs »

Good, then you might be able to help me when I have trouble with those tables :)

Don't know, I've always had a split feeling about HTML email (is that correct English?). Email is just a totally different medium. Designing full-blown graphic designs for email don't (always) make sense. To me. A webpage is a webpage, an email is an email. Trying to mix the two is it really necessary? Email is supposed to be a short writing send over the internet instead of a paper letter.

Of course I understand that the marketing guys want to dump all that glossy advertising stuff in your mailbox. And I'm sure a well-designed (!) html email has more effect then a plain text one.

I think there should be a more basic standard for html email. A subset of html/css. Just enough to style an email a bit. But not enough to create full-blown websites inside your mail client, which is not needed in my opinion. And which mail clients will prevent, due to security issues etc.

Hopefully the people from the http://www.email-standards.org/why/ will be able to make a difference
Post Reply