Html Email outlook responsive - html

I'm trying to create Html email, in other email clients my layout looks great and responsive but when I check in outlook I have just one column instead of two columns, I tried to do a conditional statement for Microsoft Outlook, but no result, I get only one column, here is my code HTML, what I'm doing wrong, please?
/* styling */
.two-col{
text-align: center;
padding: 10px 0;
width: 100%;
font-size: 0;
}
.col{
display: inline-block;
width: 100%;
max-width: 300px;
margin-bottom: 5px;
vertical-align: top;
}
.padding{
padding: 25px;
}
.content{
font-size: 15px;
text-align: left;
}
<tr>
<td>
<table role="presentation" width="100%">
<tr>
<td class="two-col">
<!--[if mso]>
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="600">
<tr>
<td width="300">
<![endif]-->
<table role="presentation" class="col">
<tr>
<td class="padding">
<table class="content">
<tr>
<td>
<img src="https://raw.githubusercontent.com/Devibtissam/emailHtmlImgs/master/img/handsPinch.png" alt="Hands Pinch">
</td>
</tr>
<tr>
<td>
<h2>
Customize this email template!
</h2>
<p style="line-height: 24px;">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Elementum mattis nisi mauris pharetra ullamcorper.
</p>
<img src="https://raw.githubusercontent.com/Devibtissam/emailHtmlImgs/master/img/Button.png" alt="Try it now">
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if mso]>
</td>
</tr>
</table>
<![endif]-->
<!--[if mso]>
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="600">
<tr>
<td width="300">
<![endif]-->
<table role="presentation" class="col">
<tr>
<td class="padding">
<table class="content">
<tr>
<td>
<img src="https://raw.githubusercontent.com/Devibtissam/emailHtmlImgs/master/img/handsGive.png" alt="Hands Give">
</td>
</tr>
<tr >
<td>
<h2>Customize this email template!</h2>
<p style="line-height: 24px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Elementum mattis nisi mauris pharetra ullamcorper.</p>
<img src="https://raw.githubusercontent.com/Devibtissam/emailHtmlImgs/master/img/Button.png" alt="Try it now">
</td>
</tr>
</table>
<!--[if mso]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</table>
<!--[if mso]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</table>
</td>
</tr>

The columns are probably just-so-slightly larger than 300 each since you have not zeroed every <table> (e.g. <table role="presentation" class="col">)
Ensure every table has minimally the following: <table role="presentation" cellspacing="0" cellpadding="0" border="0">

Related

Outlook email Images collapsing to 1px

I have made an html template that works almost perfectly except images suddenly do not appear in outlook online.
The appear to be reduced to a 1px width and height.
I have set the widths in the inline styles, but not the heights as I would like the client to have the flexibility of an auto height. The problem also occurs even when I have set a width and height.
This works fine except for outlook and I cannot work out why.
here is the code from on of the sections, though this happens to every image in the template.
I have checked that images are not turned off in my email settings
<table width="650" style="table-layout:fixed;margin-left:auto;margin-right:auto;" border="0" align="center" cellpadding="0" cellspacing="0" class="wrapper" mc:repeatable mc:variant="half and half white">
<tr>
<td align="left">
<table width="650" class="wrapper" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#ffffff">
<tr>
<td align="left">
<table width="324" border="0" align="left" cellpadding="0" cellspacing="0" class="wrapper">
<tr>
<td class="pad_top_split" width="324" align="center" valign="top">
<img src="https://gallery.mailchimp.com/85d3e81373f3d7582fcc72bdb/images/ec03eb0f-61aa-4c51-8efd-621054f0652c.jpg" width="324" class="full_img" alt="Flush image 2" style="display:block; max-width:324px;" border="0" mc:edit="324_images2">
</td>
</tr>
</table>
<!--[if gte mso 9]>
</td>
<td valign="top">
<![endif]-->
<table width="286" border="0" align="right" cellpadding="0" cellspacing="0" class="wrapper" bgcolor="#ffffff">
<tr>
<td valign="top">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="pad_side">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="32" class="fix_height"> </td>
</tr>
<tr>
<td class="white" style="font-family:Arial, sans-serif;font-size:14px;letter-spacing:4px;line-height:34px;color:#000000;" mc:edit="text_2">Lorem ipsum text</td>
</tr>
<tr>
<td height="7" style="line-height:0px;font-size:0px;"> </td>
</tr>
<tr>
<td class="white" style="font-family:Arial, sans-serif;font-size:15px;background-color:#ffffff;line-height:25px;color:#000000;" mc:edit="para_2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae interdum ligula. Pellentesque feugiat ligula ligula, in interdum dolor aliquet et. </td>
</tr>
<tr>
<td height="32" class="fix_height"> </td>
</tr>
</table>
</td>
<td width="30" class="hide"> 
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>

Outlook mobile does not pick up correct styling

Iam tying to create an newsletter, but in outlook mobile it does not pick up the correct styling. The styling which is not picked up is as follow: bold text, color of text and uppercase
Here a link to the output
The titles like Folio .... needs to be blue and bold.
thereby the text in buttons needs to be white and bold.
And the text in de full width button has to be uppercased and white
here is the html of an element with the image left text right:
<!-- // Begin Module: [Dark] Image left text right \\ -->
<table class="responsive-table" width="650" bgcolor="#d1d6e1" border="0" cellpadding="0" cellspacing="0" align="top" mc:repeatable="trading" mc:variant="[Dark] Image left text right">
<tbody>
<tr>
<td width="5%"></td>
<td width="90%" align="center">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr><td width="650" height="30"></td></tr>
<tr>
<td width="35%" align="center" valign="top" class="mobile-width-100" mc:label="image" mc:edit="iltrdimage">
<a href="#" target="_blank">
<img src="http://placehold.it/800x538" width="230" style="text-decoration: none;">
</a>
</td>
<td width="5%" class="mobile-height-30"></td>
<td width="60%" align="left" valign="top">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="padding-bottom: 5px;" mc:label="body title" md:hideable="" mc:edit="iltrdbodytitle">
<a href="#" class="block-title" style="font-family: 'OpenSans', Arial; font-size: 16px !important;line-height: 18px;color: #224691; text-decoration: none; font-weight: 700;" mc:label="heading">
<font color="#224691">Title</font>
</a>
</td>
</tr>
<tr>
<td style="padding-bottom: 10px;" mc:label="body text" mc:edit="iltrdbodytext">
<span style="font-family: 'OpenSans', Arial; color: #323232;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer pharetra hendrerit felis, eget auctor ex tincidunt eget. Vestibulum consequat quam nibh.
</span></td>
</tr>
</table>
<table bgcolor="#2f57ad" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center" class="btn">
<table cellpadding="0" cellspacing="0">
<tr>
<td mc:label="button" mc:edit="iltrdbutton">
<font color="#ffffff">Read more</font>
</td>
<td style="padding-left: 10px; padding-top: 1px;"><span style="font-size: 13px; color: #fff;">▸</span></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr><td width="650" height="30"></td></tr>
</tbody>
</table>
</td>
<td width="5%"></td>
</tr>
</tbody>
</table>
<!-- // End Module: [Dark] Image left text right \\ -->
outlook does not support all css please go have a look at https://www.campaignmonitor.com/css/
outlook versions just as ie have different css to consider so you would need something like this to cater for all the options
<!--[if gte mso 9]>
<style type="text/css">
/* Your Outlook-specific CSS goes here. */
</style>
<![endif]-->

Stacked tables will not start on new row

I am currently working on mobilizing an email template for work. The desktop version should display an image on the left and text on the right within a table. This renders fine until I tried to add an additional table. It will not start on a new line and instead, the image starts on the right hand side with the text on the next line.
Here is the sample HTML:
<body>
<tr>
<td class="innerpadding">
<table width="200" align="left" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="200" style="padding: 0 10px 10px 0;">
<img src="images/article1.png" width="200" height="200" border="0" alt="" />
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
<table width="380" align="left" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
<table class="col380" align="left" border="1" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;" >
<tr>
<td>
<table width="95%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing felis, sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan dictum, nisi libero ultricies ipsum, in posuere mauris neque at erat.
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<!--This is where the next row and table begin-->
<tr>
<td class="innerpadding">
<table width="200" align="left" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="200" style="padding: 0 10px 10px 0;">
<img src="images/article1.png" width="200" height="200" border="0" alt=""/>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
<table width="380" align="left" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
<table class="col380" align="left" border="1" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;">
<tr>
<td>
<table width="95%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing felis, sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan dictum, nisi libero ultricies ipsum, in posuere mauris neque at erat.
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</body>
I previously tried to use around the entire body, which fixed the issue, but undid the media queries that I created. Here is the inline style code that I'm using. I have been trying to apply an inline-block to the row, but it doesn't seem to render any render any differently:
tr {
display:inline-block
}
.innerpadding {padding: 0px 100px 0px 0px;}
#media only screen and (min-device-width: 400px) {
.col380 {width: 380px !important;}
}
Try this adding float left into the innerpadding class.
Also fix the your end tags you appear to be missing some. Additionally, not sure if you would want to use and when works perfectly. So I changed the beginning and to and
This is what worked for me:
.innerpadding {
padding: 0px 100px 0px 0px;
float: left
}
<!DOCTYPE html>
<html>
<head>
<style>
tr {
display: inline-block;
}
.innerpadding {
padding: 0px 100px 0px 0px;
float: left
}
{
table:;
}
</style>
<title>Something</title>
</head>
<body>
<div class="innerpadding">
<table width="200" align="left" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="200" style="padding: 0 10px 10px 0;">
<img src="images/article1.png" width="200" height="200" border="0" alt="" />
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
<table width="380" align="left" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
<table class="col380" align="left" border="1" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;" >
<tr>
<td>
<table width="95%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing felis, sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan dictum, nisi libero ultricies ipsum, in posuere mauris neque at erat.
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!--This is where the next row and table begin-->
<div class="innerpadding">
<table width="200" align="left" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="200" style="padding: 0 10px 10px 0;">
<img src="images/article1.png" width="200" height="200" border="0" alt="" />
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
<table width="380" align="left" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
<table class="col380" align="left" border="1" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;" >
<tr>
<td>
<table width="95%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In tempus adipiscing felis, sit amet blandit ipsum volutpat sed. Morbi porttitor, eget accumsan dictum, nisi libero ultricies ipsum, in posuere mauris neque at erat.
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>
<script>
</script>
</html>
References: http://www.w3schools.com/cssref/pr_class_float.asp
I think you've taken the "use tables in emails" a bit wrong. The point is not wrapping every single element inside a table, but to make the whole email one big table. Some email clients are from the last century when it comes to properly render CSS based layout. There is the only reason to use tables (except you really want tables): layout. With tables you tell what goes where on the page by putting your elements inside table cells. This way you can have layout without any CSS.
In case you insist on useless, bloated boilerplate code: try a <br> between the tables. <br> means "break line".

Align tables to be centered on mobile

How can I align these tables to centered when it hits mobile?
I need to do this without media queries to support the Gmail mobile app.
The HTML code is from an actionrocket codepen, but i don't know what will make the tables centered on mobile with breaking the desktop view
http://codepen.io/actionrocket/pen/EoCLH
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ededed">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" style=" display:block; max-width:640px !important;" bgcolor="#ffffff">
<tr>
<td>
<table id="holder" class="wrapper" border="0" cellspacing="0" cellpadding="0" style="width:100%; max-width:640px !important;" align="center">
<tr><td align="center">
<!--[if mso]>
<table id="outlookholder" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td>
<![endif]-->
<!--[if (IE)]>
<table border="0" cellspacing="0" cellpadding="0" width="640" align="center"><tr><td>
<![endif]-->
<!--2 column-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="320" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td width="20"></td>
<td width="280" bgcolor="#ededed">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><img style="display:block" border="0" src="http://placehold.it/100x100" width="100" height="100" alt=""/></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="2%"></td>
<td style="font-family:arial, Helvetica, sans-serif; font-size:22px; line-height:26px; color:#454545; text-align:center;">Module title goes here</td>
<td width="2%"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="2%"></td>
<td style="font-family:arial, Helvetica, sans-serif; font-size:14px; line-height:20px; color:#454545; text-align:center;">Praesent laoreet sem orci. Maecenas male neq nec sem gravida commodo.</td>
<td width="2%"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table width="160" border="0" cellspacing="0" cellpadding="0" class="w300" bgcolor="#a3a3a3">
<tr>
<td width="15"></td>
<td style="font-family:arial, Helvetica, sans-serif; font-size:16px; line-height:20px; color:#ffffff; text-align:center;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="10"></td>
</tr>
</table>
<a style="color:#FFFFFF; text-decoration:none;" href="#" target="_blank">Call to Action</a>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="10"></td>
</tr>
</table>
</td>
<td width="15"></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20" bgcolor="#ffffff"></td>
</tr>
</table>
</td>
<td width="20"></td>
</tr>
</table>
<!--[if mso]></td><td><![endif]-->
<table width="320" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="20"></td>
<td width="280" bgcolor="#ededed">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><img style="display:block" border="0" src="http://placehold.it/100x100" width="100" height="100" alt=""/></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="2%"></td>
<td style="font-family:arial, Helvetica, sans-serif; font-size:22px; line-height:26px; color:#454545; text-align:center;">Module title goes here</td>
<td width="2%"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="2%"></td>
<td style="font-family:arial, Helvetica, sans-serif; font-size:14px; line-height:20px; color:#454545; text-align:center;">Praesent laoreet sem orci. Maecenas male neq nec sem gravida commodo.</td>
<td width="2%"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table width="160" border="0" cellspacing="0" cellpadding="0" class="w300" bgcolor="#a3a3a3">
<tr>
<td width="15"></td>
<td style="font-family:arial, Helvetica, sans-serif; font-size:16px; line-height:20px; color:#ffffff; text-align:center;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="10"></td>
</tr>
</table>
<a style="color:#FFFFFF; text-decoration:none;" href="#" target="_blank">Call to Action</a>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="10"></td>
</tr>
</table>
</td>
<td width="15"></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="20"></td>
</tr>
</table>
</td>
<td width="20"></td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
<!--[if mso]>
</td></tr></table>
<![endif]-->
<!--[if IE]>
</td></tr></table>
<![endif]-->
</td></tr></table>
</td></tr></table>
You'll struggle to do this for Gmail. Because the containing tables for each column are aligned left you cannot override them to certain. Your best alternative is to force the desktop view for Gmail users or creating the email with Gmail & Outlook in mind and then use CSS with media queries to allow for iOS users.
Modules with new design
Don't use tables for design
I do not think you should use tables for design, see Why not use tables for layout in HTML? If you are going to use tables, you should use the CSS properties, such as:
display: table;
display: table-cell;
display: table-column;
display: table-column-group;
display: table-footer-group;
display: table-header-group;
display: table-row;
display: table-row-group;
MDN css display
Don't use inline styles
Also I see you are using inline CSS styling. See What's so bad about in-line CSS? Simply, maintaining your code gets really hard and frustrating.
Module solution
I used css-stylesheets (handy thing). In my opinion I have not used any hard to understand css-properties. Positioning is done with text-align center. (inline elements get position centered). Added padding and margin to make thins have a little more space. Used box-sizing: border-box; to maintain size even if I add padding.
width 100px + padding-top: 20px would normally be a size of 120px; with box-sizing you maintain the 100px.
How is this even mobile friendly?
Ah, glad you asked. I use an inline-block element on the module wrapper.
Actually I called the section class for .module. With the inline-block display property the elements wrap. So if there is a lot of width on the page the modules will be displayed next to one another. If there is little they will be displayed under one another.
.module {
display: inline-block;
background-color: #ddd;
width: 300px;
height: 300px;
padding-top: 30px;
box-sizing: border-box;
font-family: arial;
text-align: center;
margin: 5px;
}
.module img {
display: block;
margin: 0 auto;
width: 100px;
}
.module h1 {
font-weight: normal;
}
.invers {
border: none;
background-color: #aaa;
padding: 10px 20px;
font-size: 1em;
color: white;
cursor: pointer;
}
<div class="wrapper">
<section class="module">
<img src="http://lorempixel.com/image_output/animals-q-g-100-100-7.jpg" />
<h1>Module title goes here</h1>
<p>Praesent laoreet sem orci. Maecenas male neq nec sem gravida commodo.</p>
<button class="invers">Call to Action</button>
</section>
<section class="module">
<img src="http://lorempixel.com/image_output/animals-q-g-100-100-7.jpg" />
<h1>Module title goes here</h1>
<p>Praesent laoreet sem orci. Maecenas male neq nec sem gravida commodo.</p>
<button class="invers">Call to Action</button>
</section>
<br>
<h1>HERE is what happens if the screen gets small:</h1>
<section class="module">
<img src="http://lorempixel.com/image_output/animals-q-g-100-100-7.jpg" />
<h1>Module title goes here</h1>
<p>Praesent laoreet sem orci. Maecenas male neq nec sem gravida commodo.</p>
<button class="invers">Call to Action</button>
</section>
<br>
<section class="module">
<img src="http://lorempixel.com/image_output/animals-q-g-100-100-7.jpg" />
<h1>Module title goes here</h1>
<p>Praesent laoreet sem orci. Maecenas male neq nec sem gravida commodo.</p>
<button class="invers">Call to Action</button>
</section>
</div>

Bottom margin issue for edM in gmail

I'm creating a eDM newsletter as a template in Marketo and it views fine in nearly everything but gmail. Divs with images seem to be creating a bottom-margin or something and I can't figure out how to get rid of it. Please see mark up below and an image with red rectangles representing the problem margin areas.
Thanks!
<html>
<head>
<title>Responsive Template</title>
</head>
<body style="margin: 0px; padding: 0px;">
<table cellpadding="0" cellspacing="0" valign="top" width="100%" align="center" bgcolor="#EBEBEB" style="padding: 0px; margin: 0px;">
<tr>
<td>
<table align="center" cellpadding="0" cellspacing="0" valign="bottom">
<tr>
<td width="20"> </td>
<td><div class="mktEditable" id="headerImage" style="margin: 0px; padding: 0px;"><img src="https://placeholdit.imgix.net/~text?txtsize=25&txt=610%C3%97100&w=610&h=100" alt=""/></div></td>
<td width="20"> </td>
</tr>
</table>
<table align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="650"><div class="mktEditable" id="topBanner" style="margin: 0px; padding: 0px;"><img src="http://www.vision6.com.au/download/files/20677/2408194/Header.png" alt=""/></div></td>
</tr>
</table>
<table align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="20"> </td>
<td width="610" bgcolor="#FFFFFF"><div class="mktEditable" id="mainContent" style="padding: 20px; margin: 0px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis pharetra mi ut finibus. Sed elementum eros ut augue egestas eleifend. Quisque nibh neque.</div></td>
<td width="20"> </td>
</tr>
</table>
<table align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="20"> </td>
<td width="610" bgcolor="#FFFFFF">
<div class="mktEditable" id="footerImage" style="margin: 0px; padding: 0px;">
<img style="margin: 0px; padding: 0px;" src="https://placeholdit.imgix.net/~text?txtsize=25&txt=610%C3%97100&w=610&h=100" alt=""/>
</div></td>
<td width="20"> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<style>
#media only screen and (max-width: 650px) {
body {
width: 100% !important;
min-width: 100% !important;
}
img {
float: none !important;
height: auto;
max-width: 100%;
margin: 0px !important;
padding: 0px !important;
}
</style>
</html>
IMG(gmail): http://s4.postimg.org/p2cwbvdn1/gmailmarginissue.jpg
edit*
IMG(No margin issue/Outlook): http://s16.postimg.org/yikdy0md1/Screen_Shot_2015_09_07_at_2_39_30_pm.png
Gmail domain will not always support div tags, hence remove div tags and apply css to td and also make sure to give alignments to td's(ex: <td align="left" valign="top"></td>)
line-height was the issue. It was adding an extra 3px to the .