View Full Version : Email and CSS
05-08-2008, 02:58 AM
Can someone please tell me why Gmail wont read my HTML email correctly?
Here is the HTML.. thanks!
<style type="text/css" media="screen">@import "http://www.midwestfleet.com/include/email.css";</style>
<h1>Midwest Fleet Services</h1>
05-08-2008, 03:04 AM
There are many tutorials about creating HTML e-mails. The first rule of thumb is: forget everything youíve learned about semantics and CSS layouts. Tables are the way to go.
Iíve read a pretty good article but I canít remember where I found it. But basically it said that Gmail strips out all divs and external CSS. Youíll be better of using good olí tables and out CSS as inline styles into every element you need to style (even if it means that you have to repeat it a million times to style each table cell).
05-08-2008, 04:00 AM
Yep, inline CSS is the way to go for emails. It has to be set for every element, as in, don't expect properties to inherit. Awesome guide here: http://www.anandgraves.com/html-email-guide
05-09-2008, 03:48 AM
Alright thanks for your help guys, the table is working better I believe. But it doesn't like my CSS.. any idea whats wrong?
Thanks again for the help!
<tr style="font-family: Arial; width: inherit; height: 70px; color: #FFFFFF; margin-right: auto; background: #fff url(http://midwestfleet.com/images/top11.jpg) repeat-x top;">
<td width="550"><h1>Midwest Fleet Services</h1></td>
<td style="width: inherit; font-family: Arial; font-size: 13px; color: #454545;" colspan="2">
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.