So I'm trying to build my first responsive email, and everything is going pretty well except for my two navigation areas. The first one, I have four buttons that I would like to rearrange from running across, to stacking two ontop of two. It worked in my initial testing, but then when I sent it through my email provider, the first two tds rendered properly (both 50%) but the two that were supposed to lay underneath were all squished up to the side. Same for the second navigation I was trying to do (except, I wanted the three to switch to 100% on top of each other)
Any suggestions on how to fix this would be greatly appreciated! Here is my code (which, is working fine here, but breaks in on all mobile when I actually send it out):
/* Stacked Top Links Navigation Pattern CSS */
#media only screen and (max-width: 400px) {
td[class="main_nav"] {
padding: 0;
}
td[class="main_nav"] td {
display: inline-block;
/*float: left;*/
padding: 0 !important;
width: 50%;
}
td[class="main_nav"] a {
display: block;
padding: 10px 0;
background: #565656;
}
td[class="main_nav"] .nav1 a,
td[class="main_nav"] .nav2 a {
border-bottom: 1px solid #777;
}
td[class="main_nav"] .nav1 a,
td[class="main_nav"] .nav3 a {
border-right: 1px solid #777;
}
}
/* Stacked Top Links Navigation Pattern CSS */
#media only screen and (max-width: 400px) {
td[class="secondary_nav"] {
padding: 0;
}
td[class="secondary_nav"] td {
display: inline-block;
/*float: left;*/
padding: 0 !important;
width: 100%;
}
td[class="secondary_nav"] a {
display: block;
padding: 10px 0;
background: #005c5b;
text-align: center;
}
td[class="secondary_nav"] .nav1 a,
td[class="secondary_nav"] .nav2 a {
border-bottom: 1px solid #fff;
}
}
<!-- BEGINNING OF NAVIGATION -->
<table cellpadding="0" cellspacing="0" bgcolor="#565656">
<tr>
<td class="main_nav" width="600" bgcolor="#565656">
<table cellpadding="0" cellspacing="0" width="100%" bgcolor="#565656" style="width:100%!important">
<tr>
<td class="nav1" align="center" style="padding: 10px 10px; font-family: arial,sans-serif; font-size: 11px;">
Nav 1
</td>
<td class="nav2" align="center" style="padding: 10px 10px; font-family: arial,sans-serif; font-size: 11px;">
Nav 2
</td>
<td class="nav3" align="center" style="padding: 10px 10px; font-family: arial,sans-serif; font-size: 11px;">
Nav 3
</td>
<td align="center" style="padding: 10px 10px; font-family: arial,sans-serif; font-size: 11px;">
Nav 4
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
<!-- END OF NAVIGATION -->
<!-- BEGINNING OF SECONDARY STORY NAVIGATION -->
<table cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td class="secondary_nav" width="600">
<table cellpadding="0" cellspacing="0" width="100%" bgcolor="#005c5b">
<tr>
<td class="nav1" width="33.33%" align="center" style="padding: 20px 10px 20px 30px; text-align:left;border-right:solid 1px #ffffff;">
Secondary nav 1
</td>
<td class="nav2" width="33.33%" align="center" style="padding: 20px 10px 20px 30px; font-family: arial,sans-serif; font-size: 11px; text-align:left;border-right:solid 1px #ffffff;">
Secondary nav 2
</td>
<td class="nav3" width="33.33%" align="center" style="padding: 20px 10px 20px 30px; font-family: arial,sans-serif; font-size: 11px; text-align:left;">
Secondary nav 3
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- END OF SECONDARY STORY NAVIGATION -->
I would suggest swapping out your inline cells for aligned tables. Cells won't play nice with 50%, you always need to go just under that. In saying that, your cells will never align correctly, which you'll see in my version below.
One draw back to using aligned tables so close is that you'll need to add in ghost tables around your tables, to ensure Outlook respects the close alignment you want and doesn't add the 20px margin it requires between tables.
I only made a tweak to your original cell width, to 49% in the header CSS and then I created my aligned tables version in a new row underneath your original code, with a new main_nav_inner class inside of my wrapping table.
<!DOCTYPE HTML>
<html>
<head>
<style type="text/css">
/* Stacked Top Links Navigation Pattern CSS */
#media only screen and (max-width: 400px) {
td[class="main_nav"] {
padding: 0;
}
td[class="main_nav"] td {
display: inline-block;
/*float: left;*/
padding: 0 !important;
width: 49%;
}
td[class="main_nav2"] .main_nav_inner table {
width: 50%!important;
}
td[class="main_nav"] a {
display: block;
padding: 10px 0;
background: #565656;
}
td[class="main_nav"] .nav1 a,
td[class="main_nav"] .nav2 a,
td[class="main_nav2"] .main_nav_inner .nav1,
td[class="main_nav2"] .main_nav_inner .nav2 {
border-bottom: 1px solid #777;
}
td[class="main_nav"] .nav1 a,
td[class="main_nav"] .nav3 a,
td[class="main_nav2"] .main_nav_inner .nav1,
td[class="main_nav2"] .main_nav_inner .nav3 {
border-right: 1px solid #777;
}
}
/* Stacked Top Links Navigation Pattern CSS */
#media only screen and (max-width: 400px) {
td[class="secondary_nav"] {
padding: 0;
}
td[class="secondary_nav"] td {
display: inline-block;
/*float: left;*/
padding: 0 !important;
width: 100%;
}
td[class="secondary_nav"] a {
display: block;
padding: 10px 0;
background: #005c5b;
text-align: center;
}
td[class="secondary_nav"] .nav1 a,
td[class="secondary_nav"] .nav2 a {
border-bottom: 1px solid #fff;
}
}
</style>
</head>
<body style="min-width: 100%; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-right: 0px" yahoo="fix">
<!-- BEGINNING OF NAVIGATION -->
<table cellpadding="0" cellspacing="0" bgcolor="#565656" width="100%">
<tr>
<td class="main_nav" bgcolor="#565656">
<table cellpadding="0" cellspacing="0" width="100%" bgcolor="#565656" style="width:100%!important">
<tr>
<td class="nav1" align="center" style="padding: 10px 10px; font-family: arial,sans-serif; font-size: 11px;">
Nav 1
</td>
<td class="nav2" align="center" style="padding: 10px 10px; font-family: arial,sans-serif; font-size: 11px;">
Nav 2
</td>
<td class="nav3" align="center" style="padding: 10px 10px; font-family: arial,sans-serif; font-size: 11px;">
Nav 3
</td>
<td class="nav4" align="center" style="padding: 10px 10px; font-family: arial,sans-serif; font-size: 11px;">
Nav 4
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="main_nav2" bgcolor="#565656">
<table cellpadding="0" cellspacing="0" width="100%" bgcolor="#565656" style="width:100%!important">
<tr>
<td class="main_nav_inner">
<!--[if gte mso 9]>
<table border="0" cellpadding="0" cellspacing="0" style="width:600px;">
<tr>
<td valign="top" style="width:150px;">
<![endif]-->
<table align="left" class="nav1" border="0" cellpadding="0" cellspacing="0" style="width:25%;">
<tr>
<td align="center" style="padding: 10px 10px; font-family: arial,sans-serif; font-size: 11px;">
Nav 1
</td>
</tr>
</table>
<!--[if gte mso 9]>
</td>
<td valign="top" style="width:150px;">
<![endif]-->
<table align="left" class="nav2" border="0" cellpadding="0" cellspacing="0" style="width:25%;">
<tr>
<td align="center" style="padding: 10px 10px; font-family: arial,sans-serif; font-size: 11px;">
Nav 2
</td>
</tr>
</table>
<!--[if gte mso 9]>
</td>
<td valign="top" style="width:150px;">
<![endif]-->
<table align="left" class="nav3" border="0" cellpadding="0" cellspacing="0" style="width:25%;">
<tr>
<td align="center" style="padding: 10px 10px; font-family: arial,sans-serif; font-size: 11px;">
Nav 3
</td>
</tr>
</table>
<!--[if gte mso 9]>
</td>
<td valign="top" style="width:150px;">
<![endif]-->
<table align="left" class="nav4" border="0" cellpadding="0" cellspacing="0" style="width:25%;">
<tr>
<td align="center" style="padding: 10px 10px; font-family: arial,sans-serif; font-size: 11px;">
Nav 4
</td>
</tr>
</table>
<!--[if gte mso 9]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
<!-- END OF NAVIGATION -->
<!-- BEGINNING OF SECONDARY STORY NAVIGATION -->
<table cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td class="secondary_nav" width="600">
<table cellpadding="0" cellspacing="0" width="100%" bgcolor="#005c5b">
<tr>
<td class="nav1" width="33.33%" align="center" style="padding: 20px 10px 20px 30px; text-align:left;border-right:solid 1px #ffffff;">
Secondary nav 1
</td>
<td class="nav2" width="33.33%" align="center" style="padding: 20px 10px 20px 30px; font-family: arial,sans-serif; font-size: 11px; text-align:left;border-right:solid 1px #ffffff;">
Secondary nav 2
</td>
<td class="nav3" width="33.33%" align="center" style="padding: 20px 10px 20px 30px; font-family: arial,sans-serif; font-size: 11px; text-align:left;">
Secondary nav 3
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- END OF SECONDARY STORY NAVIGATION -->
</body>
</html>
Related
I've created an email template which is rendering incorrectly on Outlook Desktop for Windows (2016, 2019).
The entire layout is a single table, with different parts of the email taking up a row (<tr>).
I have two nested tables, each in their own <tr>, with the exact same markup. When I tested it out on Litmus, the second table is narrower than the first.
How the email is rendered:
The markup:
<!DOCTYPE html>
<html lang="">
<style>
body {
padding: 20px;
font-family: Arial, Helvetica, sans-serif;
}
p {
margin: 0;
}
center {
padding: 20px;
background-color: lightyellow;
border: .1px solid gray;
}
center p {
margin: 5px 0;
}
.red {
color: red;
}
.align-center {
text-align: center;
}
.align-end {
text-align: end;
}
.dataTableContainer {
width: 100%;
text-align: left;
}
.dataTable {
width: 100%;
font-size: 14px;
border-collapse: collapse;
border: 0.5px solid gray;
}
.dataTable th, .dataTable td {
text-align: left;
border: 0.1px solid gray;
padding: 8px 5px;
}
.dataTable tr {
font-size: 14px;
mso-line-height-rule: exactly;
line-height: 90%;
}
.dataTable tr:nth-of-type(even) {
background-color: #f2f2f2;
}
.dataTable thead tr th {
border-bottom: 2px solid gray;
}
.dataTable thead tr {
background-color: #f2f2f2;
}
.footerCell {
text-align: center;
}
.brand {
font-size: 12px;
letter-spacing: 5px;
}
.main_brand {
font-size: 18px;
font-weight: bold;
font-style: italic;
letter-spacing: 1.8px;
}
.main_brand span {
font-size: 15px;
font-weight: initial;
}
</style>
<body>
<table width="100%">
<tr width="100%">
<td>
<p>Dear Customer,</p>
</td>
</tr>
<tr width="100%" align="center">
<td height="13" valign="middle" style="margin: 0; font-size: 0px; line-height: 0px;"> </td>
</tr>
<tr width="100%" align="center">
<td>
<center>
<p class="red">
<b>YOU HAVE ACCOUNTS WHICH ARE PAST DUE</b>
</p>
<p>The below orders are scheduled to ship in the next few days and are</p>
<p class="red">
<b>AT RISK DUE TO CUSTOMER PAST DUE BALANCE</b>
</p>
<p>
In order to avoid delays, please collect payment ASAP. These orders will not be released until payment is received
</p>
<p>
Click the link below to view the customer statement
</p>
</center>
</td>
</tr>
<tr width="100%" align="center">
<td height="13" valign="middle" style="margin: 0; font-size: 0px; line-height: 0px;"> </td>
</tr>
<tr width="100%" align="center">
<td class='dataTableContainer'>
<table cellpadding="0" cellspacing="0" class="dataTable" style="width:100%;">
<thead>
<tr>
<th><b>Order #</b></th>
<th><b>Status</b></th>
<th><b>Customer Name</b></th>
<th><b>Req Ship Date</b></th>
<th><b>Account Due</b></th>
<th><b>Account Past Due</b></th>
<th><b>Statement URL</b></th>
</tr>
</thead>
<tbody>
<tr>
<td>141926275</td>
<td>Partially Shipped</td>
<td>Adam Smith</td>
<td>2021-10-22</td>
<td class="align-end">$471.56</td>
<td class="align-end">$471.57</td>
<td>View Statement</td>
</tr>
<tr>
<td>141926275</td>
<td>Partially Shipped</td>
<td>Adam Smith</td>
<td>2021-10-22</td>
<td class="align-end">$471.56</td>
<td class="align-end">$471.57</td>
<td>View Statement</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr width="100%" align="center">
<td height="13" valign="middle" style="margin: 0; font-size: 0px; line-height: 0px;"> </td>
</tr>
<tr width="100%" align="center">
<td class='dataTableContainer'>
<table cellpadding="0" cellspacing="0" class="dataTable" style="width:100%;">
<thead>
<tr>
<th><b>Order #</b></th>
<th><b>Status</b></th>
<th><b>Customer Name</b></th>
<th><b>Req Ship Date</b></th>
<th><b>Account Due</b></th>
<th><b>Account Past Due</b></th>
<th><b>Statement URL</b></th>
</tr>
</thead>
<tbody>
<tr>
<td>141926275</td>
<td>Partially Shipped</td>
<td>Adam Smith</td>
<td>2021-10-22</td>
<td class="align-end">$471.56</td>
<td class="align-end">$471.57</td>
<td>View Statement</td>
</tr>
<tr>
<td>141926275</td>
<td>Partially Shipped</td>
<td>Adam Smith</td>
<td>2021-10-22</td>
<td class="align-end">$471.56</td>
<td class="align-end">$471.57</td>
<td>View Statement</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</body>
</html>
Through trial and error I found the incriminating line of CSS.
body {
padding: 20px;
}
padding on the body was causing the second table to get narrower than the first. Replacing padding with margin did the trick.
I still have no idea why padding is causing trouble.
I am new to email designing. I've an image, some text and a button in a row. When viewed on a mobile device, the image has to be static and the button need to come below the text. So the Image and the text + button has to be side by side. I've used divs and nested divs. Its working as expected on Mobile device. However, the layout is breaking on some web based mail clients such as AOL, Yahoo and Gmail. Working fine on comcast and outlook web. Not sure what I am doing wrong. Please help.
Correctly rendered on comcast web.
Incorrectly rendered on Yahoo web based mail.
Here is the code I've used :
#media screen and (max-width: 480px) {
/* What it does: Forces table cells into full-width rows. */
.stack-column,
.stack-column-center {
display: block !important;
width: 100% !important;
max-width: 100% !important;
direction: ltr !important;
}
/* What it does: Forces table cells into 1/3-width rows. */
.stack-column-half,
.stack-column-center-half {
display: inline-block !important;
width: 140px !important;
max-width: 140px !important;
direction: ltr !important;
}
/* What it does: Forces table cells into 2/3-width rows. */
.stack-column-2half,
.stack-column-center-2half {
display: inline-block !important;
width: 190px !important;
max-width: 190px !important;
direction: ltr !important;
}
/* And center justify these ones. */
.stack-column-center {
text-align: center !important;
}
/* What it does: Generic utility class for centering. Useful for images, buttons, and nested tables. */
.center-on-narrow {
text-align: center !important;
display: block !important;
margin-left: auto !important;
margin-right: auto !important;
float: none !important;
}
table.center-on-narrow {
display: inline-block !important;
}
/* What it does: Adjust typography on small screens to improve readability */
.email-container p {
font-size: 17px !important;
}
<tr>
<!-- dir=ltr is where the magic happens. This can be changed to dir=rtl to swap the alignment on wide while maintaining stack order on narrow. -->
<td dir="ltr" height="100%" valign="top" width="100%" style="font-size:0; padding: 10px 0; background-color: #ffffff;">
<!--[if mso]>
<table role="presentation" border="0" cellspacing="0" cellpadding="0" width="600" style="width: 600px;">
<tr>
<td valign="top" width="200" style="width: 200px;">
<![endif]-->
<div style="display:inline-block; margin: 0 -1px; max-width: 200px; min-width:80px; vertical-align:top; width:100%;" class="stack-column-half">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td dir="ltr" style="padding: 0 10px 10px 10px;">
<img src="https://aishvaryarastogi.worldsecuresystems.com/waze-newsletter-images/Waze_Newsletter_Modules_Desktop_22.png" width="180" height="" border="0" alt="alt_text" class="center-on-narrow" style="width: 100%; max-width: 180px; height: auto; background: #dddddd; font-family: sans-serif; font-size: 15px; line-height: 15px; color: #555555; border-radius: 10px;">
</td>
</tr>
</table>
</div>
<!--[if mso]>
</td>
<td valign="top" width="400" style="width: 400px;">
<![endif]-->
<div style="display:inline-block; margin: 0 -1px; max-width: 400px; min-width:160px; vertical-align:top; padding-top: 40px; " class="stack-column-2half mobile-padding1">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td dir="ltr" style="font-family:'Open Sans', Arial, sans-serif; font-size: 15px; line-height: 20px; color: #555555; padding: 10px 0px 0; text-align: left;" class="center-on-narrow fallback-text mobile-padding1">
<!--[if mso]>
<table role="presentation" border="0" cellspacing="0" cellpadding="0" width="400">
<tr>
<td valign="middle" width="200">
<![endif]-->
<div style="display:inline-block; margin: 0 -1px; width:100%; min-width:80px; max-width:200px; vertical-align:top; padding: 0 0px;" class="stack-column" align="left">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 0 20px;" class="mobile-padding1">
<h2 style="margin: 0 0 10px 0; font-family:'Open Sans', Arial, sans-serif; font-size: 15px; line-height: 18px; color: #333333; font-weight: bold;">John Smith</h2>
<p style="margin: 0 0 10px 0;">Title, title</p>
</td>
</tr>
</table>
</div>
<!--[if mso]>
</td>
<td valign="middle" width="200">
<![endif]-->
<div style="display:inline-block; margin: 0 -1px; width:100%; min-width:80px; max-width:200px; vertical-align:top; padding-top:0 0px; " class="stack-column mobile-padding1">
<!-- Button : BEGIN -->
<!--[if mso]>
<v:roundrect xmlns_v="urn:schemas-microsoft-com:vml" xmlns_w="urn:schemas-microsoft-com:office:word" href="https://google.com/" style="height:45px;v-text-anchor:middle;width:150px;" arcsize="50%" stroke="false" fillcolor="#32C2EE">
<w:anchorlock/>
<center style="color:#333333;font-family:'Open Sans', Arial,sans-serif;font-size:15px;">Contact</center>
</v:roundrect>
<![endif]-->
<!--[if !mso]> <!-->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" style="float:none;" align="left">
<tr>
<td class="button-td button-td-primary" style="border-radius: 30px; background: #ffffff;">
<a class="button-a button-a-primary fallback-text" href="https://google.com/" style="background: #32C2EE; border: 0px solid #000000; font-family:'Open Sans', Arial, sans-serif; font-size: 15px; font-weight: bold; line-height: 15px; text-decoration: none; padding: 18px 55px; color: #333333; display: block; border-radius: 30px;">Contact</a>
</td>
</tr>
</table>
<!-- <![endif]-->
<!-- Button : END -->
</div>
<!--[if mso]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</table>
</div>
<!--[if mso]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
<!-- Thumbnail Left, Text Right : END -->
I had a play with your code and it seems you are missing width:100%; on the following line:
<div style="display:inline-block; margin: 0 -1px; max-width: 400px; min-width:160px; vertical-align:top; padding-top: 40px;" class="stack-column-2half mobile-padding1">
Once added, the contact link went back into the same line as John Smith and Title, title.
You can try the code below to see if it works for you. I had to add table codes around the table rows to get the rendering to work.
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<!-- dir=ltr is where the magic happens. This can be changed to dir=rtl to swap the alignment on wide while maintaining stack order on narrow. -->
<td dir="ltr" height="100%" valign="top" width="100%" style="font-size:0; padding: 10px 0; background-color: #ffffff;">
<!--[if mso]>
<table role="presentation" border="0" cellspacing="0" cellpadding="0" width="600" style="width: 600px;">
<tr>
<td valign="top" width="200" style="width: 200px;">
<![endif]-->
<div style="display:inline-block; margin: 0 -1px; max-width: 200px; min-width:80px; vertical-align:top; width:100%;" class="stack-column-half">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td dir="ltr" style="padding: 0 10px 10px 10px;">
<img src="https://aishvaryarastogi.worldsecuresystems.com/waze-newsletter-images/Waze_Newsletter_Modules_Desktop_22.png" width="180" height="" border="0" alt="alt_text" class="center-on-narrow" style="width: 100%; max-width: 180px; height: auto; background: #dddddd; font-family: sans-serif; font-size: 15px; line-height: 15px; color: #555555; border-radius: 10px;">
</td>
</tr>
</table>
</div>
<!--[if mso]>
</td>
<td valign="top" width="400" style="width: 400px;">
<![endif]-->
<div style="display:inline-block; margin: 0 -1px; max-width: 400px; min-width:160px; vertical-align:top; padding-top: 40px;width:100%;" class="stack-column-2half mobile-padding1">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td dir="ltr" style="font-family:'Open Sans', Arial, sans-serif; font-size: 15px; line-height: 20px; color: #555555; padding: 10px 0px 0; text-align: left;" class="center-on-narrow fallback-text mobile-padding1">
<!--[if mso]>
<table role="presentation" border="0" cellspacing="0" cellpadding="0" width="400">
<tr>
<td valign="middle" width="200">
<![endif]-->
<div style="display:inline-block; margin: 0 -1px; width:100%; min-width:80px; max-width:200px; vertical-align:top; padding: 0 0px;" class="stack-column" align="left">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 0 20px;" class="mobile-padding1">
<h2 style="margin: 0 0 10px 0; font-family:'Open Sans', Arial, sans-serif; font-size: 15px; line-height: 18px; color: #333333; font-weight: bold;">John Smith</h2>
<p style="margin: 0 0 10px 0;">Title, title</p>
</td>
</tr>
</table>
</div>
<!--[if mso]>
</td>
<td valign="middle" width="200">
<![endif]-->
<div style="display:inline-block; margin: 0 -1px; width:100%; min-width:80px; max-width:200px; vertical-align:top; padding-top:0 0px; " class="stack-column mobile-padding1">
<!-- Button : BEGIN -->
<!--[if mso]>
<v:roundrect xmlns_v="urn:schemas-microsoft-com:vml" xmlns_w="urn:schemas-microsoft-com:office:word" href="https://google.com/" style="height:45px;v-text-anchor:middle;width:150px;" arcsize="50%" stroke="false" fillcolor="#32C2EE">
<w:anchorlock/>
<center style="color:#333333;font-family:'Open Sans', Arial,sans-serif;font-size:15px;">Contact</center>
</v:roundrect>
<![endif]-->
<!--[if !mso]> <!-->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" style="float:none;" align="left">
<tr>
<td class="button-td button-td-primary" style="border-radius: 30px; background: #ffffff;">
<a class="button-a button-a-primary fallback-text" href="https://google.com/" style="background: #32C2EE; border: 0px solid #000000; font-family:'Open Sans', Arial, sans-serif; font-size: 15px; font-weight: bold; line-height: 15px; text-decoration: none; padding: 18px 55px; color: #333333; display: block; border-radius: 30px;">Contact</a>
</td>
</tr>
</table>
<!-- <![endif]-->
<!-- Button : END -->
</div>
<!--[if mso]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</table>
</div>
<!--[if mso]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
<!-- Thumbnail Left, Text Right : END -->
</tbody>
</table>
Someone please help! My company purchased an email template and all seemed well, but now they have requested that I make it so when the email is viewed as a web page at full size, it stays at the standard 660px. Every thing I have tried has resulted in either it resizing but no longer being responsive or vice versa. I know it's something simple, I know it's gotta be possible but I am just at a loss with this pre-purchased template. Any help to make this header media responsive but also only full size to 660 is appreciated. Code Below
</title>
<style type="text/css">
.Hasna html { width: 640px; }
.Hasna ::-moz-selection{background:#fefac7;color:#4a4a4a;}
.Hasna ::selection{background:#fefac7;color:#4a4a4a;}
.Hasna body { margin: 0; padding: 0; }
.Hasna .ReadMsgBody { width: 640px; background-color: #f1f1f1; }
.Hasna ExternalClass { width: 640px; background-color: #f1f1f1; }
.Hasna a { color:#eb7260; text-decoration: none; font-weight: normal; font-style: normal; }
.Hasna p, .Hasna div, .Hasna span { margin: 0 !important; }
.Hasna table { border-collapse: collapse;}
#media only screen and (max-width: 640px) {
body { width: auto !important;}
body table table{width:100% !important; }
body table[class="table-wrapper"] {width: auto !important; margin: 0px 20px !important;}
body table[class="table-inner"] {width: 100% !important; margin: 0 auto !important;}
body table[class="full"] {width: 100% !important; margin: 0 auto !important;}
body table[class="center"] {margin: 0 auto !important;}
body td[class="center"] {text-align: center !important;}
body td[class="rewrite_padding"] {padding:0px !important; border-left: none !important;}
body img[class="img_scale"] {width: 100% !important; height: auto !Important;}
body img[class="divider"] {width: 100% !important; height: 2px !Important;}
}
#media only screen and (max-width: 479px) {
body { width: auto !important;}
body table table{width:100% !important; }
body table[class="table-wrapper"] {width: auto !important; margin: 0px 20px !important;}
body table[class="table-inner"] {width: 100% !important; margin: 0 auto !important;}
body table[class="full"] {width: 100% !important; margin: 0 auto !important;}
body table[class="center"] {margin: 0 auto !important;}
body td[class="center"] {text-align: center !important;}
body td[class="rewrite_padding"] {padding:0px !important; border-left: none !important;}
body img[class="img_scale"] {width: 100% !important; height: auto !Important;}
body img[class="divider"] {width: 100% !important; height: 2px !Important;}
body td[class="one_third"] {width: 100% !important; display: block !important; padding-bottom: 20px; margin: 0 auto !important; text-align: center !important;}
body td[class="one_third_last"] {width: 100% !important; display: block !important; margin: 0 auto !important; text-align: center !important;}
}
</style><!--[if lt mso 14]>
<style type="text/css">
td span {
font-family: Arial, sans-serif;
}
td a {
font-family: Arial, sans-serif;
}
body {font-family: Arial, sans-serif !important;}
</style>
<![endif]-->
<!--[if mso 15]>
<style type="text/css">
td span {
font-family: Arial, sans-serif;
}
td a {
font-family: Arial, sans-serif;
}
body {font-family: Arial, sans-serif !important;}
</style>
<![endif]-->
</head>
<body style="background-color:#ffffff; margin:0; padding:0;">
<!-- START header -->
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="100%" align="center">
<table ds-data-bg="1" bgcolor="#333333" class="ds-bg-module ele-active" width="100%" border="0" background="https://cs.homecity.com/images/email_icons/newsletterhouse2.jpg" align="center" style="">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;">
<v:fill type="tile" src="https://cs.homecity.com/images/email_icons/r" color="#333333" ></v:fill>
<v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0">
<![endif]-->
<tbody>
<tr>
<td valign="top" align="center">
<table class="table-wrapper" width="660" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 60px 20px;">
<table class="table-inner" width="640" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td valign="top">
<table class="full" width="640" border="0" align="left" cellpadding="0" cellspacing="0" style="border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;">
<!-- START OF HEADER FOR LOGO & PREHEADER-->
<tbody>
<tr class="ds-remove" data-remove="ds-remove-1">
<td mc:edit="text_header" class="one_third" width="230" align="left" valign="middle" style=" margin: 0;font-weight: normal; font-size:14px ; color:#ffffff; font-family: 'Nunito', sans-serif; line-height: 18px;mso-line-height-rule: exactly;">
<multiline>
<span class="tea14-content-editable">Newsletter issue #1</span>
</multiline>
</td>
<td mc:edit="logo" class="one_third" width="180" align="center" valign="top" style="">
<span><img src="http://cdn3.homecity.com/inc/skins/pt-1r/schemes/homecity/img/homecity-new-white.png" editable="true" alt="logo" width="250" height="" border="0" style="display: inline-block; border-color: rgb(21, 177, 210); color: rgb(21, 177, 210);"></span>
</td>
<td mc:edit="forward" class="one_third_last" width="230" align="right" valign="middle" style=" margin: 0;font-weight: normal; font-size:14px ; color:#ffffff; font-family: 'Nunito', sans-serif; line-height: 18px;mso-line-height-rule: exactly;">
<multiline>
<span>Web version Forward</span>
</multiline>
</td>
</tr><!-- END OF HEADER FOR LOGO & PREHEADER-->
<!-- START OF HEADING-->
<tr class="ds-remove" data-remove="ds-remove-2">
<td mc:edit="heading" colspan="3" align="center" valign="middle" style="margin: 0; padding-top: 60px; padding-bottom: 20px; text-transform: uppercase; font-size:28px ; font-weight: normal; color:#ffffff; font-family: 'Nunito', Arial, sans-serif; line-height: 140%; mso-line-height-rule: exactly;">
<multiline>
<span class="tea14-content-editable">The Insider</span>
</multiline>
</td>
</tr><!-- END OF HEADING-->
<!-- START OF DIVIDER IMAGE-->
<tr class="ds-remove" data-remove="ds-remove-3">
<td mc:edit="div_header" colspan="3" align="center" valign="middle" style="margin: 0; padding-bottom: 20px; font-size:14px ; font-weight: normal; color:#ffffff; font-family: 'Nunito', Arial, sans-serif; line-height:100%;">
<span class="tea14-content-editable"><img src="images/heading-divider-img.png" editable="true" alt="heading-divider-img" width="195" height="15" border="0" style="display: inline-block;"></span>
</td>
</tr><!-- END OF DIVIDER IMAGE-->
<!-- START OF HEADING-->
<tr class="ds-remove" data-remove="ds-remove-4">
<td mc:edit="heading1" colspan="3" align="center" valign="middle" style="margin: 0; padding-bottom: 0; font-size:18px ; font-weight: 300; color:#ffffff; font-family: 'Nunito', Arial, sans-serif; line-height: 140%; mso-line-height-rule: exactly;">
<multiline>
<span class="tea14-content-editable">Hi! I hope you've been well, I've put together some things I thought you might find interesting this month... enjoy!</span>
</multiline>
</td>
</tr><!-- END OF HEADING-->
<!-- START OF BUTTON-->
<!-- END OF BUTTON-->
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr><!--[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]-->
</tbody>
</table>
</td>
</tr>
</tbody>
</table><!-- END header -->
Working with a background image can be tricky but this template you bought looks decent. I made a few edits that I think will solve your problem. In the nested table that includes the background image I gave it this style
<style="background-repeat:no-repeat; background-position:center;">
I also wanted that same effect to carry over into the outlook fix, so I changed the fill type to frame rather than tile:
<v:fill type="frame" src="https://cs.homecity.com/images/email_icons/r" color="#333333" ></v:fill>
Try this code in your body:
<body style="background-color:#ffffff; margin:0; padding:0;">
<!-- START header -->
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="100%" align="center">
<table ds-data-bg="1" bgcolor="#333333" class="ds-bg-module ele-active" width="100%" border="0" background="https://cs.homecity.com/images/email_icons/newsletterhouse2.jpg" align="center" style="background-repeat:no-repeat; background-position:center;">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;">
<v:fill type="frame" src="https://cs.homecity.com/images/email_icons/r" color="#333333" ></v:fill>
<v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0">
<![endif]-->
<tbody>
<tr>
<td valign="top" align="center">
<table class="table-wrapper" width="660" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 60px 20px;">
<table class="table-inner" width="640" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td valign="top">
<table class="full" width="640" border="0" align="left" cellpadding="0" cellspacing="0" style="border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;">
<!-- START OF HEADER FOR LOGO & PREHEADER-->
<tbody>
<tr class="ds-remove" data-remove="ds-remove-1">
<td mc:edit="text_header" class="one_third" width="230" align="left" valign="middle" style=" margin: 0;font-weight: normal; font-size:14px ; color:#ffffff; font-family: 'Nunito', sans-serif; line-height: 18px;mso-line-height-rule: exactly;">
<multiline>
<span class="tea14-content-editable">Newsletter issue #1</span>
</multiline>
</td>
<td mc:edit="logo" class="one_third" width="180" align="center" valign="top" style="">
<span><img src="http://cdn3.homecity.com/inc/skins/pt-1r/schemes/homecity/img/homecity-new-white.png" editable="true" alt="logo" width="250" height="" border="0" style="display: inline-block; border-color: rgb(21, 177, 210); color: rgb(21, 177, 210);"></span>
</td>
<td mc:edit="forward" class="one_third_last" width="230" align="right" valign="middle" style=" margin: 0;font-weight: normal; font-size:14px ; color:#ffffff; font-family: 'Nunito', sans-serif; line-height: 18px;mso-line-height-rule: exactly;">
<multiline>
<span>Web version Forward</span>
</multiline>
</td>
</tr><!-- END OF HEADER FOR LOGO & PREHEADER-->
<!-- START OF HEADING-->
<tr class="ds-remove" data-remove="ds-remove-2">
<td mc:edit="heading" colspan="3" align="center" valign="middle" style="margin: 0; padding-top: 60px; padding-bottom: 20px; text-transform: uppercase; font-size:28px ; font-weight: normal; color:#ffffff; font-family: 'Nunito', Arial, sans-serif; line-height: 140%; mso-line-height-rule: exactly;">
<multiline>
<span class="tea14-content-editable">The Insider</span>
</multiline>
</td>
</tr><!-- END OF HEADING-->
<!-- START OF DIVIDER IMAGE-->
<tr class="ds-remove" data-remove="ds-remove-3">
<td mc:edit="div_header" colspan="3" align="center" valign="middle" style="margin: 0; padding-bottom: 20px; font-size:14px ; font-weight: normal; color:#ffffff; font-family: 'Nunito', Arial, sans-serif; line-height:100%;">
<span class="tea14-content-editable"><img src="images/heading-divider-img.png" editable="true" alt="heading-divider-img" width="195" height="15" border="0" style="display: inline-block;"></span>
</td>
</tr><!-- END OF DIVIDER IMAGE-->
<!-- START OF HEADING-->
<tr class="ds-remove" data-remove="ds-remove-4">
<td mc:edit="heading1" colspan="3" align="center" valign="middle" style="margin: 0; padding-bottom: 0; font-size:18px ; font-weight: 300; color:#ffffff; font-family: 'Nunito', Arial, sans-serif; line-height: 140%; mso-line-height-rule: exactly;">
<multiline>
<span class="tea14-content-editable">Hi! I hope you've been well, I've put together some things I thought you might find interesting this month... enjoy!</span>
</multiline>
</td>
</tr><!-- END OF HEADING-->
<!-- START OF BUTTON-->
<!-- END OF BUTTON-->
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr><!--[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]-->
</tbody>
</table>
</td>
</tr>
</tbody>
</table><!-- END header -->
</body>
I'm trying to create an HTML newsletter template that will show a list of tags at some point in that email. The number of elements of that list is dynamic. Instead of having a comma/space-separated list, I would like to style those tags with a border around each of the tags, for example.
Formatting as a table will probably not work, because generating one for each tag will create a table too wide to display properly within its parent table. On the other hand, generating one will not result in an inline list.
I thought of either doing it using with their css set to display:inline; or a set to display:inline; as well:
<span class="hashtag-span">#hashtag</span>
<span class="hashtag-span">#anotherone</span>
or alternatively
<ul class="hashtag-list">
<li>#hashtag</li>
<li>#anotherone</li>
</ul>
Probably the trickiest part: this has to be Outlook-compatible :(
You can see what I'd like to achive in my jsfiddle:
http://jsfiddle.net/wo64xLnf/3/
Thanks for your help, crowd!
This is not an easy task at all and requires quite a bit of reiterate code. Your best bet is to use MSO conditional with tables to make it work for Outlook and divs with display:inline-block for most other clients. Span tags as objects has very spotty support in many clients, span is best used just for styling fonts in HTML email.
See below for programmatic HTML block:
<!--[if ( gte mso 9) | (IE)]><table align="left"><tr><td align="center" valign="top" style="padding: 0 4px 5px 0;"><![endif]-->
<div style="display: inline-block; vertical-align: top; margin: 0 4px 5px 0;">
<table bgcolor="#eaeaea" valign="top" align="center" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; background: #eaeaea;">
<tr>
<td align="center" bgcolor="#eaeaea" style="padding: 3px 5px 3px 3px; font-size: 12px; border: #666666 1px solid;">#hashtag</td>
</tr>
</table>
</div>
<!--[if (mso) | (IE)]></td></tr></table><![endif]-->
And this is a full version using your HTML from the fiddle:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<!--[if ( gte mso 9) | (IE)]><table align="left"><tr><td align="center" valign="top" style="padding: 0 4px 5px 0;"><![endif]-->
<div style="display: inline-block; vertical-align: top; margin: 0 4px 5px 0;">
<table bgcolor="#eaeaea" valign="top" align="center" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; background: #eaeaea;">
<tr>
<td align="center" bgcolor="#eaeaea" style="padding: 3px 5px 3px 3px; font-size: 12px; border: #666666 1px solid;">#hashtag</td>
</tr>
</table>
</div>
<!--[if (mso) | (IE)]></td></tr></table><![endif]-->
<!--[if ( gte mso 9) | (IE)]><table align="left"><tr><td align="center" valign="top" style="padding: 0 4px 5px 0;"><![endif]-->
<div style="display: inline-block; vertical-align: top; margin: 0 4px 5px 0;">
<table bgcolor="#eaeaea" valign="top" align="center" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; background: #eaeaea;">
<tr>
<td align="center" bgcolor="#eaeaea" style="padding: 3px 5px 3px 3px; font-size: 12px; border: #666666 1px solid;">#anotherone</td>
</tr>
</table>
</div>
<!--[if (mso) | (IE)]></td></tr></table><![endif]-->
<!--[if ( gte mso 9) | (IE)]><table align="left"><tr><td align="center" valign="top" style="padding: 0 4px 5px 0;"><![endif]-->
<div style="display: inline-block; vertical-align: top; margin: 0 4px 5px 0;">
<table bgcolor="#eaeaea" valign="top" align="center" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; background: #eaeaea;">
<tr>
<td align="center" bgcolor="#eaeaea" style="padding: 3px 5px 3px 3px; font-size: 12px; border: #666666 1px solid;">#anotherAwesomeHashtag</td>
</tr>
</table>
</div>
<!--[if (mso) | (IE)]></td></tr></table><![endif]-->
<!--[if ( gte mso 9) | (IE)]><table align="left"><tr><td align="center" valign="top" style="padding: 0 4px 5px 0;"><![endif]-->
<div style="display: inline-block; vertical-align: top; margin: 0 4px 5px 0;">
<table bgcolor="#eaeaea" valign="top" align="center" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; background: #eaeaea;">
<tr>
<td align="center" bgcolor="#eaeaea" style="padding: 3px 5px 3px 3px; font-size: 12px; border: #666666 1px solid;">#thiswillgoviral</td>
</tr>
</table>
</div>
<!--[if (mso) | (IE)]></td></tr></table><![endif]-->
<!--[if ( gte mso 9) | (IE)]><table align="left"><tr><td align="center" valign="top" style="padding: 0 4px 5px 0;"><![endif]-->
<div style="display: inline-block; vertical-align: top; margin: 0 4px 5px 0;">
<table bgcolor="#eaeaea" valign="top" align="center" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; background: #eaeaea;">
<tr>
<td align="center" bgcolor="#eaeaea" style="padding: 3px 5px 3px 3px; font-size: 12px; border: #666666 1px solid;">#hashtagcraziness</td>
</tr>
</table>
</div>
<!--[if (mso) | (IE)]></td></tr></table><![endif]-->
<!--[if ( gte mso 9) | (IE)]><table align="left"><tr><td align="center" valign="top" style="padding: 0 4px 5px 0;"><![endif]-->
<div style="display: inline-block; vertical-align: top; margin: 0 4px 5px 0;">
<table bgcolor="#eaeaea" valign="top" align="center" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; background: #eaeaea;">
<tr>
<td align="center" bgcolor="#eaeaea" style="padding: 3px 5px 3px 3px; font-size: 12px; border: #666666 1px solid;">#thisRocks</td>
</tr>
</table>
</div>
<!--[if (mso) | (IE)]></td></tr></table><![endif]-->
<!--[if ( gte mso 9) | (IE)]><table align="left"><tr><td align="center" valign="top" style="padding: 0 4px 5px 0;"><![endif]-->
<div style="display: inline-block; vertical-align: top; margin: 0 4px 5px 0;">
<table bgcolor="#eaeaea" valign="top" align="center" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; background: #eaeaea;">
<tr>
<td align="center" bgcolor="#eaeaea" style="padding: 3px 5px 3px 3px; font-size: 12px; border: #666666 1px solid;">#yetanotherone</td>
</tr>
</table>
</div>
<!--[if (mso) | (IE)]></td></tr></table><![endif]-->
<!--[if ( gte mso 9) | (IE)]><table align="left"><tr><td align="center" valign="top" style="padding: 0 4px 5px 0;"><![endif]-->
<div style="display: inline-block; vertical-align: top; margin: 0 4px 5px 0;">
<table bgcolor="#eaeaea" valign="top" align="center" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; background: #eaeaea;">
<tr>
<td align="center" bgcolor="#eaeaea" style="padding: 3px 5px 3px 3px; font-size: 12px; border: #666666 1px solid;">#onemore</td>
</tr>
</table>
</div>
<!--[if (mso) | (IE)]></td></tr></table><![endif]-->
<!--[if ( gte mso 9) | (IE)]><table align="left"><tr><td align="center" valign="top" style="padding: 0 4px 5px 0;"><![endif]-->
<div style="display: inline-block; vertical-align: top; margin: 0 4px 5px 0;">
<table bgcolor="#eaeaea" valign="top" align="center" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; background: #eaeaea;">
<tr>
<td align="center" bgcolor="#eaeaea" style="padding: 3px 5px 3px 3px; font-size: 12px; border: #666666 1px solid;">#lastone</td>
</tr>
</table>
</div>
<!--[if (mso) | (IE)]></td></tr></table><![endif]-->
</body>
</html>
I actually Just had this exact same problem. Here is a solid solution I came up with:
<tr>
<td align="left">
<table>
<tr>
<td valign="center" align="left" style="padding: 2px 2px 0 0;">
<span style="padding: 2px 4px; border: 1px solid #dddddd; border-radius: 6px; -webkit-border-radius: 6px;">
hashtag
</span>
</td>
</tr>
</table>
</td>
</tr>
Phillyoo, Outlook doesn't render 'display' style attributes. Even though the code above works, it will not render properly in Outlook.
Check out https://www.campaignmonitor.com/css/ - it's a good guide for designing emails.
You should be able to achieve your desired goal by using tables, rows, and td's. Use inline styling and apply 'align="left"' to your nested td's.
Example:
<table width="100%">
<tr>
<td>
<table>
<tr>
<td align="left" style="">#hashtag</td>
</tr>
</table>
<table>
<tr>
<td align="left" style="">#hashtag</td>
</tr>
</table>
</td>
</tr>
</table>
You could also try having the TD tags in the same nested table and see how that works for you.
Best
I'm creating a responsive email design where several images switch out for the smaller screens. I've reformatted tables and tds several times and the smaller images don't show. The images are live online. Please help.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Happy St. Patrick's Day</title>
<style type="text/css">
body { margin: 0px; padding: 0px; }
#media only screen and (max-width: 660px) {
table.one { width: 480px !important; }
table.two { width: 480px !important; }
table.three { width: 480px !important; }
table.four { width: 480px !important; }
table.five { width: 480px !important; }
td.shamtop img { display: none; }
td.shamtop { background: #00A160 url(http://www.poscorp.com/emarketing/2015/images/top-shamrock-med.gif) no-repeat; height: 79px; }
td.shammid img { display: none; }
td.shammid { background: #00A160 url(http://www.poscorp.com/emarketing/2015/images/mid-shamrock-med.gif) no-repeat; height: 151px; }
td.maintext p {font-size: 26px; }
}
#media only screen and (max-width: 510px) {
table.one { width: 300px !important; }
table.two { width: 300px !important; }
table.three { width: 300px !important; }
table.four { width: 300px !important; }
table.five { width: 300px !important; }
td.shamtop img { display: none; }
td.shamtop { background: #00A160 url(http://www.poscorp.com/emarketing/2015/images/top-shamrock-sm.gif) no-repeat; height: 79px; }
td.shammid img { display: none; }
td.shammid { background: #00A160 url(http://www.poscorp.com/emarketing/2015/images/mid-shamrock-sm.gif) no-repeat; height: 89px; }
}
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="600" border="0" cellspacing="0" cellpadding="0" class="one" align="center">
<tr>
<td bgcolor="#00a160" class="shamtop" style="background: #00A160; margin: 0px;"><img src="http://www.poscorp.com/emarketing/2015/images/top-shamrock-lrg.gif" width="600" height="79"></td>
</tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center" class="two">
<tr>
<td bgcolor="#ffffff" class="maintext" style="font-family: Arial, Helvetica, sans-serif; font-size: 32px; line-height:120%; color: #000; background: #FFF; padding: 15px 18px 10px 18px; font-weight:bold; text-align:center;"><p style="margin-top: 0px; margin-bottom: 16px;">In honor of St. Patrick’s Day we’d like to save you some <span style="color: #00a160;">GREEN</span>!</p></td>
</tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center" class="three">
<tr>
<td class="shammid" bgcolor="#b7da63" style="background: #b7da63;"><img src="http://www.poscorp.com/emarketing/2015/images/mid-shamrock-lrg.gif" width="600" height="195"></td>
</tr>
<tr>
<td align="center" bgcolor="#b7da63" style="background: #b7da63; font-family: Arial, Helvetica, sans-serif; font-size: 17px; line-height:120%; color: #000; padding: 15px 20px 10px 20px; font-weight:bold; text-align:center;"><p style="font-size:22px; margin-top:0px; margin-bottom: 7px;">Enter to Win $200 Towards a NEW Print Item.</p>
<p style="margin-top:0px; margin-bottom: 0px;">All entries must be made by the end of day today. <br>
Five winners will be drawn.</p></td>
</tr>
<tr>
<td align="center" bgcolor="#b7da63" style="background: #b7da63; padding: 0px 20px 15px 20px; text-align:center;"><img src="http://www.poscorp.com/emarketing/2015/images/enter-to-win-btn.gif" width="180" height="45"></td>
</tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center" class="four">
<tr>
<td align="center" valign="top" class="contact" style="font-family: Arial, sans-serif; font-size: 14px; line-height:115%; color: #333; background: #FFF; padding: 20px 20px 20px 20px;">
<table width="275" border="0" cellspacing="0" cellpadding="0" align="left" class="logo">
<tr>
<td class="poslogo"><img src="http://www.poscorp.com/emarketing/2015/images/pos_logo_hc.gif" alt="POS Professional Office Services, Inc." width="272" height="45"></td>
</tr>
</table>
<table width="275" border="0" cellspacing="0" cellpadding="0" align="right" class="info">
<tr>
<td><p style="font-family: Arial, sans-serif; font-size: 14px; line-height: 100%; color: #333; font-weight:bold; margin:20px 0px 5px 0px; text-align:right;">800.331.4976 | www.poscorp.com | <img src="http://www.poscorp.com/emarketing/2015/images/linkedin.jpg" alt="LinkedIn" width="16" height="16" border="0" style="vertical-align:bottom;"/></p></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center" class="five">
<tr>
<td align="center" valign="top" style="font-family: Arial, sans-serif; font-size: 12px; line-height:115%; color: #FFF; background: #00a160; padding: 5px 15px 5px 15px; margin:0px; font-style:italic;"><p>This offer is non-transferable and entries are limited to one entry per recipient.<br>
Contest winners will be notified by March 19th.</p></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html
Your html has a defined style which is overriding the css on your elements. For instance, changing:
<td class="shammid" bgcolor="#b7da63" style="background: #b7da63;">
<img src="http://www.poscorp.com/emarketing/2015/images/mid-shamrock-lrg.gif" width="600" height="195">
</td>
to
<td class="shammid" bgcolor="#b7da63">
<img src="http://www.poscorp.com/emarketing/2015/images/mid-shamrock-lrg.gif" width="600" height="195">
</td>
Yields the result you're looking for.
You should also consider removing the bgcolor attribute as it has been deprecated in HTML5.