Ext-js custom html data attributes - dom

I need to be able to set a 'data-selenium-id' attribute for every (dynamic and not dynamic) child input field. I can set the parent tag (table in this case) with a data selenium id using the override below and I was hoping that it would set all the fields. I am quite new to ext-js and I have to keep the code in the override functions and am struggling to find the answer. the foo: 'bar' line of code below is something I've tried and also have tried calling out the parent id 'TextSearch' and setting attributes that way, however it does not come up with any new attributes. Also, as you can see the top table tag is listed with an ID. This id was created by me for a test, all tags will be created on the fly by ext-js.
Ext.override(Ext.AbstractComponent, {
onBoxReady: function () {
var me = this,
el = me.getEl();
el.set({foo: 'bar'});
if (el && el.dom) {
if (me.itemId || me.name) {
el.dom.setAttribute('data-selenium-id', me.itemId || me.name);
} else {
if (me.pickerField && me.pickerField.itemId && me.xtype) {
el.dom.setAttribute('data-selenium-id', me.pickerField.itemId + '-' + me.xtype);
}
if (me.timeField && me.timeField.itemId && me.xtype) {
el.dom.setAttribute('data-selenium-id', me.timeField.itemId + '-' + me.xtype);
}
}
}
me.callOverridden(arguments);
}
});
However I need all input fields that are dynamically created to have this attribute as well. The HTML is below.
<table class="x-field x-table-plain x-form-item x-form-type-text x-field-toolbar x-box-item x-toolbar-item x-field-default-toolbar x-hbox-form-item" style="width: 130px; table-layout: fixed; right: auto; left: 830px; top: 1px; margin: 0px;" cellpadding="0"
role="presentation" id="triggerfield-1126" foo="bar" data-selenium-id="TextSearch">
<tbody>
<tr role="presentation" id="triggerfield-1126-inputRow" class="x-form-item-input-row">
<td role="presentation" id="triggerfield-1126-labelCell" style="display:none;" valign="top" halign="left" width="5" class="x-field-label-cell">
<label id="triggerfield-1126-labelEl" for="triggerfield-1126-inputEl" class="x-form-item-label x-unselectable x-form-item-label-left" style="margin-right:5px;" unselectable="on"></label>
</td>
<td role="presentation" class="x-form-item-body x-form-trigger-wrap-focus" id="triggerfield-1126-bodyEl" colspan="3" style="width: 100%;">
<table id="triggerfield-1126-triggerWrap" class="x-form-trigger-wrap" cellpadding="0" cellspacing="0" role="presentation" style="width: 100%; table-layout: fixed;">
<tbody role="presentation">
<tr role="presentation">
<td id="triggerfield-1126-inputCell" class="x-form-trigger-input-cell" role="presentation" style="width: 100%;">
<input id="triggerfield-1126-inputEl" type="text" role="textbox" size="1" name="triggerfield-1126-inputEl" placeholder="Search events" class="x-form-field x-form-text x-form-focus x-field-form-focus x-field-default-toolbar-form-focus" autocomplete="off"
data-errorqtip="" style="width: 100%;">
</td>
<td role="presentation" valign="top" class=" x-trigger-cell x-unselectable" style="width:17px;" id="ext-gen1260">
<div class="x-trigger-index-0 x-form-trigger x-form-clear-trigger x-form-trigger-first" role="presentation" id="ext-gen1259"></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

Related

Unable to send embedded image in email using FluentEmail

I'm using FluentEmail in ASP.NET core 2.0 class library which will be sending the Email notification.
Below is the sample code I have tried till now:
using FluentEmail.Core;
using FluentEmail.Razor;
using FluentEmail.Smtp;
using System;
using System.IO;
using System.Net.Mail;
using System.Net.Mime;
namespace FluentEmail
{
public class EmailNotification : IEmailNotification
{
public bool SendEmailNotification()
{
try
{
//Setup Default sender befault sending the email.
SmtpClient smtpClient = new SmtpClient
{
Host = "smtp.office365.com",
Port = 587,
EnableSsl = true,
Credentials = new System.Net.NetworkCredential("username", "Password")
};
Email.DefaultSender = new SmtpSender(smtpClient);
Email.DefaultRenderer = new RazorRenderer();
string imagePath = #"C:\Users\pratik.soni\Downloads\FluentLogo.png";
Stream stream = new FileStream(imagePath, FileMode.Open, FileAccess.Read);
stream.Flush();
stream.Seek(0, SeekOrigin.Begin);
var attachment = new Core.Models.Attachment()
{
Data = stream,
ContentType = "image/png",
Filename = "FluentLogo.png",
IsInline = true
};
var email = Email
.From("pratik.soni#1rivet.com")
.To("pratik.soni10#gmail.com")
.Subject("Test")
.Body("<html>Inline image here: <img src=\"cid:FluentLogo.png\">" +
"<p>You should see an image without an attachment, or without a download prompt, dependig on the email client.</p></html>", true);
email.Attach(attachment);
email.Send();
return true;
}
catch (Exception ex)
{
return false;
}
}
}
}
My HTML file is as follow:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FluentEmail - Test with template and attachment</title>
</head>
<body style="margin: 0; padding: 0; background-color: #e5e5e5;" marginheight="0" topmargin="0" marginwidth="0" leftmargin="0">
<!--100% body table-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#d8e7ea" style="background-color: #e5e5e5;">
<!--intro-->
<table width="620" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" width="11" height="100"></td>
<td valign="middle" height="100">
<!--break-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"></td>
</tr>
</table>
<!--/break-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="59%" height="100">
<table width="280" border="0" cellspacing="0" cellpadding="20">
<tr>
<td bgcolor="#333333">
<h1 style="font-family: Arial, Helvetica, sans-serif; font-size: 42px; margin: 0; padding: 0; color: #fff;">Typographic</h1>
<p style="text-transform: uppercase; font-size: 14px; color: #fff; margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif;">
<currentdayname>
<currentday>
<currentmonthname>
<currentyear>
</p>
</td>
</tr>
</table>
</td>
<td width="41%" height="100" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom" height="70">
<p style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333; text-transform: uppercase; margin: 0; padding: 0;"> Email not looking beautiful?<br>
<webversion style="text-decoration: none; color: #cc0000">View it in your browser</webversion>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--break-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"></td>
</tr>
</table>
<!--/break-->
</td>
</tr>
</table>
<!--/intro-->
<!--content section-->
<table width="620" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="82" width="11" valign="middle"></td>
<td height="82" bgcolor="#FFFFFF" valign="middle">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" height="37" bgcolor="#fef041">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#ffffff" width="25" height="37"></td>
<td width="15" height="37"></td>
<td>
<h2 style="color: #333333 !important; font-size: 21px; font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0; text-shadow: 1px 1px 1px #fff;"> #Model.Title</h2>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top"></td>
<td bgcolor="#FFFFFF" valign="top">
<table width="560" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<p style="font-size: 14px; color: #333333; margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif;"> Dear #Model.Name, You are totally #Model.Compliment. </p>
<br>
<table bgcolor="#000000" width="540" border="0" cellspacing="10" cellpadding="0">
<tr>
<td>
<img src=\"cid:#Model.ImgSrc\">
</td>
</tr>
<tr>
<td width="540" height="158"><img style="margin: 0; padding: 0; display: block;" border="0" src="C:\Users\pratik.soni\Downloads\2016-fluent-logo-design-digital-marketing-20nine-4.png" width="540" height="158" alt="img1"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--/100% body table-->
</body>
</html>
I have also tried with only passing image path to the imgsrc in html but that is also not working.
Please let me know what I'm missing in here.
Also, is there any such package like FluentEmail which can provide such all facility with ASP.NET Core 2.0?
You have to use a LinkedResource; have a look at this
using (LinkedResource image = new LinkedResource(#"c:\assets\image.jpg", "image/jpeg") { ContentId = "myimage" })
using (MailMessage mail = new MailMessage())
using (SmtpClient smtpClient = new SmtpClient())
{
smtpClient.Host = "smtp.alfki.com";
String body = #"
<html>
<head></head>
<body>
<img src=""cid:myimage"" />
</body>
</html>
";
AlternateView view = AlternateView.CreateAlternateViewFromString(body, null, "text/html");
view.LinkedResources.Add(image);
mail.IsBodyHtml = true;
mail.AlternateViews.Add(view);
mail.From = new MailAddress("John.Doe#alfki.com");
mail.To.Add("Jane.Doe#alfki.com");
mail.Subject = "An email with an inline image";
smtpClient.Send(mail);
}
Edit:
It works in .NET Core/Standard.
I can not speak for FluentMail; maybe you can do without?

How to prevent inline bloc from my email to stack on iPad?

I originally created an email using MJML and adapted the code to improve the mobile version.
1) I haven't any problem while checking the email with chrome and testing it with all desktop client with litmus, but the ipad version of the email stack inline blocks.
2) Some elements only displayed on mobile using media queries are not visible when testing the email whereas I can see them with chrome.
Here is the preview of the issues:
enter image description here
Here is the link of the html file:
Html file
Here is the beginning of the code:
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title>Invitiation à l'avant-première "Quoi de neuf au moyen âge ?"</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--[if !mso]><!-->
<style type="text/css">
#media (max-width:660px) {
#-ms-viewport { width: 320px; }
#viewport { width: 320px; }
}
</style>
<!--<![endif]-->
<style type="text/css">
#outlook a { padding: 0; }
.ReadMsgBody { width: 100%; }
.ExternalClass { width: 100%; }
.ExternalClass * { line-height: 100%; }
body { margin: 0; padding: 0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
table, td { border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; }
img { border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; }
p { display: block; margin: 13px 0; }
.hidden-desktop {display: none!important; max-height: 0; font-size: 0; overflow: hidden; line-height: 0; mso-hide: all;}
#media (min-width:660px) {
.mj-column-per-100, * [aria-labelledby="mj-column-per-100"] { width: 100%!important; }
.mj-column-px-200, * [aria-labelledby="mj-column-px-200"] { width: 200px!important; }
.mj-column-px-30, * [aria-labelledby="mj-column-px-30"] { width: 30px!important; }
.mj-column-px-430, * [aria-labelledby="mj-column-px-430"] { width: 430px!important; }
.mj-column-px-410, * [aria-labelledby="mj-column-px-410"] { width: 410px!important; }
.mj-column-px-20, * [aria-labelledby="mj-column-px-20"] { width: 20px!important; }
}
#media (max-width:659px) {
.mj-column-per-100, * [aria-labelledby="mj-column-per-100"] { width: 280px!important; display: block!important; margin: 0 auto; }
.mj-column-px-200, * [aria-labelledby="mj-column-px-200"] { width: 280px!important; display: block!important; margin: 0 auto; }
.mj-column-px-30, * [aria-labelledby="mj-column-px-30"] { width: 0px!important; }
.mj-column-px-430, * [aria-labelledby="mj-column-px-430"] { width: 280px!important; display: block!important; margin: 0 auto; }
.mj-column-px-410, * [aria-labelledby="mj-column-px-410"] { width: 280px!important; display: block!important; margin: 0 auto; }
.mj-column-px-20, * [aria-labelledby="mj-column-px-20"] { width: 0px!important; }
.invitation-desktop { display: none!important; }
.image-expo { height: 400px!important; background-repeat: no-repeat!important; }
.hidden-desktop{ display: block!important; max-height: none!important; font-size: 12px; line-height: 1.5!important; overflow: visible!important; }
.mobile-space{ height: 20px; }
.mobile-auto-height{ height: auto!important; }
.hidden-mobile{ display: none!important }
.logo-table { width: 80px!important; float: left; }
.logo-padding { padding: 7px!important; }
.logo { width:66px!important;height:66px!important; }
.invitation-mobile-title{ width: 200px; float: left; height: 80px;}
.social-mobile{ width: 80px!important; height: 80px; display: inline-block!important; }
.social-space-mobile { width: 20px!important; }
}
</style>
<!--[if mso]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
<!--[if !mso]><!-->
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,500,700" rel="stylesheet" type="text/css">
<!--<![endif]-->
</head>
<body style="background: #e8e8e8;">
<div style="background-color:#e8e8e8;">
<!--[if mso | IE]>
<table border="0" cellpadding="0" cellspacing="0" width="660" align="center" style="width:660px;">
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin:0 auto;max-width:660px;">
<table cellpadding="0" cellspacing="0" style="font-size:0px;width:100%;" align="center" border="0">
<tbody>
<tr>
<td style="text-align:center;vertical-align:top;font-size:0px;padding:0px;">
<!--[if mso | IE]>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="vertical-align:top;width:660px;">
<![endif]-->
<div aria-labelledby="mj-column-per-100" class="mj-column-per-100" style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;">
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="word-break:break-word;font-size:0px;padding:15px;" align="center">
<div style="cursor:auto;color:#a6a6a6;font-family:'Lato', Arial, sans-serif;font-size:11px;font-weight:300;line-height:13px;text-transform:none;">
Vous avez des problèmes d’affichage ?
<a href="#" style="font-weight: 300; font-size: 11px; text-transform: none; font-family:'Lato', Arial, sans-serif; color:#a6a6a6">
Visualiser cet email en ligne
</a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
<!--[if mso | IE]>
<table border="0" cellpadding="0" cellspacing="0" width="660" align="center" style="width:660px;">
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin:0 auto;max-width:660px;">
<table cellpadding="0" cellspacing="0" style="font-size:0px;width:100%;" align="center" border="0">
<tbody>
<tr>
<td style="text-align:center;vertical-align:top;font-size:0px;padding:0px;">
<!--[if mso | IE]>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="vertical-align:top;width:200px;">
<![endif]-->
<div aria-labelledby="mj-column-px-200" class="mj-column-px-200" style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:200px;">
<table class="logo-table" cellpadding="0" cellspacing="0" style="vertical-align:top;background:#fff;" width="100%" border="0">
<tbody>
<tr>
<td class="logo-padding" style="word-break:break-word;font-size:0px;padding:25px;" align="center">
<table cellpadding="0" cellspacing="0" style="border-collapse:collapse;border-spacing:0px;" align="center" border="0">
<tbody>
<tr>
<td style="width:150px;">
<img class="logo" alt="" title="" height="150px" src="http://bank.digital-expression.fr/universcience/logo-cite.png" style="border:none;display:block;outline:none;text-decoration:none;width:100%;height:150px;" width="150">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!--[if !mso]><!-->
<table class="hidden-desktop invitation-mobile-title" cellpadding="0" cellspacing="0" width="200px" border="0" style="border-collapse:collapse;border-spacing:0px;">
<tbody>
<tr>
<td width="20px">
</td>
<td width="180px">
<table cellpadding="0" cellspacing="0" style="vertical-align:top;" width="100%" border="0">
<tbody>
<tr>
<td style="word-break:break-word;font-size:0px;padding:11px 0px;background-color:#d81921;" align="center">
<div style="cursor:auto;color:#ffffff;font-family:'Lato', Arial, sans-serif;font-size:28px;font-weight:400;line-height:28px;text-transform:uppercase;">Invitation</div>
</td>
</tr>
<tr>
<td style="word-break:break-word;font-size:0px;padding:0px 0px;background-color:#000" align="center">
<div style="cursor:auto;color:#ffffff;font-family:'Lato', Arial, sans-serif;font-size:15px;font-weight:400;line-height:30px;text-transform:uppercase;">
<span style="letter-spacing: 3px">
avant-première
</span>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<div style="clear:both;"></div>
<!--<![endif]-->
</div>
<!--[if mso | IE]>
</td>
<td style="vertical-align:top;width:30px;">
<![endif]-->
<!--[if !mso]><!-->
<div class="mobile-space hidden-desktop" style="font-size:1px;line-height:30px;"> </div>
<!--<![endif]-->
<div aria-labelledby="mj-column-px-30" class="mj-column-px-30" style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:30px;">
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
<td style="vertical-align:top;width:430px;">
<![endif]-->
<div aria-labelledby="mj-column-px-430" class="mj-column-px-430" style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:430px;">
<table cellpadding="0" cellspacing="0" style="vertical-align:top;" width="100%" border="0">
<tbody>
<tr>
<td style="word-break:break-word;font-size:0px;padding:0px;" align="left">
<div class="image-expo" style="margin:0 auto;height:200px;max-width:430px;background:#f2b3b7 url(http://bank.digital-expression.fr/universcience/bg-expo.jpg) bottom right / 430px 200px no-repeat;">
<!--[if mso | IE]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:430px;">
<v:fill origin="0.5, 0" position="0.5,0" type="tile" src="http://bank.digital-expression.fr/universcience/bg-expo.jpg" />
<v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0">
<![endif]-->
<table class="image-expo" cellpadding="0" cellspacing="0" height="200px" style="font-size:0px;width:100%;height:200px;background:#f2b3b7 url(http://bank.digital-expression.fr/universcience/bg-expo.jpg) bottom right / 430px 200px no-repeat;" align="center" border="0" background="http://bank.digital-expression.fr/universcience/bg-expo.jpg">
<tbody>
<tr>
<td style="text-align:center;vertical-align:top;font-size:0px;padding:0px;">
<!--[if mso | IE]>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="vertical-align:top;width:410px;">
<![endif]-->
<div aria-labelledby="mj-column-px-410" class="mj-column-px-410" style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;">
<table cellpadding="0" cellspacing="0" style="vertical-align:top;" width="100%" border="0">
<tbody>
<tr>
<td style="word-break:break-word;font-size:0px;padding:0px;">
<div style="font-size:1px;line-height:20px;"> </div>
</td>
</tr>
<tr>
<td style="word-break:break-word;font-size:0px;padding:0px 0px 0px 20px;" align="left">
<div style="cursor:auto;color:#ffffff;font-family:'Lato', sans-serif;font-size:30px;font-weight:700;line-height:30px;text-transform:uppercase;">
Quoi de neuf<br> au moyen âge ?
</div>
</td>
</tr>
<tr>
<td style="word-break:break-word;font-size:0px;padding:0px;">
<div style="font-size:1px;line-height:20px;"> </div>
</td>
</tr>
<tr>
<td style="word-break:break-word;font-size:0px;padding:0px 0px 0px 20px;" align="left">
<div style="cursor:auto;color:#ffffff;font-family:'Lato', sans-serif;font-size:14px;font-weight:400;line-height:16px;text-transform:uppercase;">
TOUT CE QUE L’ARCHEOLOGIE<br> NOUS RÉVÈLE
</div>
</td>
</tr>
<tr>
<td style="word-break:break-word;font-size:0px;padding:0px;">
<div style="font-size:1px;line-height:10px;"> </div>
</td>
</tr>
<tr>
<td style="word-break:break-word;font-size:0px;padding:0px 0px 0px 20px;" align="left">
<div style="cursor:auto;color:#ffffff;font-family:'Lato', sans-serif;font-size:40px;font-weight:700;line-height:40px;text-transform:uppercase;">
+
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
<td style="vertical-align:top;width:20px;">
<![endif]-->
<div aria-labelledby="mj-column-px-20" class="mj-column-px-20" style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;">
<table cellpadding="0" cellspacing="0" style="vertical-align:top;" width="100%" border="0">
<tbody>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tbody>
</table>
<!--[if mso | IE]>
</v:textbox>
</v:rect>
<![endif]-->
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
<!--[if mso | IE]>
<table border="0" cellpadding="0" cellspacing="0" width="660" align="center" style="width:660px;">
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div class="mobile-space" style="font-size:1px;line-height:30px;"> </div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
...I can't put the complete code on my post to be under 30000 signs.
</div>
</body>
</html>
Thank you for helping,
Well that's a common issue with iOs 9 and blank space between div. Even if font-size is set to 0px it acts like if it still here.
You'll have to minify your HTML to make it look nice again.
I did it for you : http://pastebin.com/0RX92bat and here's how it looks on Litmus on iPad Retina with Mail http://imgur.com/DfziId3
You can use https://github.com/kangax/html-minifier to get the same result with these options :
{ collapseWhitespace: true,
removeEmptyAttributes: true,
minifyCSS: true }
I've run into this problem many times and the easiest fix I've found is to add a margin: 0 -2px; to each display: inline-block;:
`<div style="display: inline-block; margin: 0 -2px;">`
The same problem exists on the web, as outlined in Fight the Space Between Inline-Block Elements on CSS Tricks. This article includes a few other examples in case you don't like the negative margin hack.

How to eliminate white lines in HTML emails mostly seen on iPhone

I'm trying to get rid of these white lines that iPhone users are seeing in these emails. This can be reproduced by viewing the email in chrome when re-sizing the browser. Whether the white lines appear or not depends on the size of the window. It only happens to the image slices of the left-most data-cell in a table-row.
Here is the code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html charset=UTF-8" />
<title></title>
<style type="text/css">
/***START, CSS targeting client bugs***/
body {
-webkit-text-size-adjust: none;
-ms-text-size-adjust: none;
/* Prevents Webkit and Windows Mobile platforms from changing default font sizes. */
}
.ExternalClass {
width: 100%;
/* Forces Hotmail to display emails at full width */
}
.ExternalClass,
.ExternalClass p,
.ExternalClass span,
.ExternalClass font,
.ExternalClass td,
.ExternalClass div {
line-height: 100%;
/* Forces Hotmail to display normal line spacing */
}
body {
margin: 0;
padding: 0;
/* Resets all body margins and padding to 0 for good measure */
}
p {
margin: 1em 0;
}
table td {
border-collapse: collapse;
/*This resolves the Outlook 07, 10, and Gmail td padding issue */
}
#-ms-viewport {
width: device-width;
}
/***END, CSS targeting client bugs***/
/***START, Reset styles***/
p {
margin: 0;
padding: 0;
margin-bottom: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: black;
line-height: 100%;
}
/***END, Reset styles***/
#media only screen and (max-width: 480px) {
a[href^="tel"],
a[href^="sms"] {
text-decoration: underline;
color: #0063ba;
pointer-events: none;
cursor: default;
}
.mobile_link a[href^="tel"],
.mobile_link a[href^="sms"] {
text-decoration: underline;
color: #0063ba !important;
pointer-events: auto;
cursor: default;
}
body {
overflow-x: hidden !important;
text-align: center !important;
background-color: #ffffff !important;
}
body[yahoo] .container {
width: 320px !important;
display: block !important;
}
body[yahoo] .drop {
width: 100% !important;
display: block !important;
text-align: center !important;
padding: 2px 0 !important;
}
body[yahoo] .hide_this {
display: none !important;
}
body[yahoo] .respond_to_width {
width: 100% !important;
display: block !important;
}
body[yahoo] .mobile_image {
width: 100% !important;
height: auto !important;
}
body[yahoo] .pushto100 {
width: 100% !important;
}
body[yahoo] .centerthis {
text-align: center !important;
display: inline-block !important;
}
}
</style>
</head>
<custom name="opencounter" type="tracking">
<body style="margin: 0px; padding:0px; -webkit-text-size-adjust:none; -ms-text-size-adjust: none;" yahoo="fix">
<!--CENTER EMAIL_start-->
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="respond_to_width">
<tr>
<td align="center" valign="top">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left" valign="top">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td align="left" valign="top" style="font-size:11px;font-family:arial,sans-serif;color:#333333;padding:10px 0;">
Click to view this message in a browser
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" valign="top">
<table cellpadding="0" cellspacing="0" border="0" width="640" class="respond_to_width">
<tr>
<td colspan="2" align="left" valign="top">
<a conversion="TRUE" alias="body_header" href="https://www.google.com"><img class="mobile_image" style="display:block;" border="0" src="http://i.imgsafe.org/84aa6e6.png" width="640" height="143" alt="email header" title="start shopping"></a>
</td>
</tr>
<tr>
<td align="left" valign="top">
<a conversion="TRUE" alias="body_zone1" href="https://www.google.com"><img class="mobile_image" style="display:block;" border="0" src="http://i.imgsafe.org/87ba827.png" width="321" height="192" alt="clickzone 1" title="shop Halloween costmes"></a>
</td>
<td align="left" valign="top">
<a conversion="TRUE" alias="body_zone2" href="https://www.google.com"><img class="mobile_image" style="display:block;" border="0" src="http://i.imgsafe.org/8b26eb0.png" width="319" height="192" alt="clickzone 2" title="shop Halloween costmes"></a>
</td>
</tr>
<tr>
<td align="left" valign="top">
<a conversion="TRUE" alias="body_zone3" href="https://www.google.com"><img class="mobile_image" style="display:block;" border="0" src="http://i.imgsafe.org/8c23711.png" width="321" height="159" alt="clickzone 3"></a>
</td>
<td align="left" valign="top">
<a conversion="TRUE" alias="body_zone4" href="https://www.google.com"><img class="mobile_image" style="display:block;" border="0" src="http://i.imgsafe.org/8d3de4a.png" width="319" height="159" alt="clickzone 4" title="shop Halloween costmes"></a>
</td>
</tr>
<tr>
<td align="left" valign="top">
<a conversion="TRUE" alias="body_zone5" href="https://www.google.com"><img class="mobile_image" style="display:block;" border="0" src="http://i.imgsafe.org/8e4baa8.png" width="321" height="191" alt="clickzone 5" title="shop Halloween costmes"></a>
</td>
<td align="left" valign="top">
<a conversion="TRUE" alias="body_zone6" href="https://www.google.com"><img class="mobile_image" style="display:block;" border="0" src="http://i.imgsafe.org/9053862.png" width="319" height="191" alt="clickzone 6" title="shop Halloween costmes"></a>
</td>
</tr>
<tr>
<td colspan="2" align="left" valign="top">
<a conversion="TRUE" alias="body_footer" href="https://www.google.com"><img class="mobile_image" style="display:block;" border="0" src="http://i.imgsafe.org/9226e55.png" width="640" height="181" alt="email footer" title="contact us, etc"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" valign="top" style="font-size:0%;padding:10px 0 0 0;display:none;">
%%=ContentAreaByName("Divider_Green")=%%
</td>
</tr>
<!--SOCIAL BUTTONS/-->
<tr>
<td align="center" valign="top">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left" valign="top">
FaceBook
</td>
<td align="left" valign="top"> | </td>
<td align="left" valign="top">
<a href="https://plus.google.com/" alias="Google+" target="_blank">
Google+
</a>
</td>
<td align="left" valign="top"> | </td>
<td align="left" valign="top">
<a href="https://instagram.com/" alias="Instagram" target="_blank">
InstaGram
</a>
</td>
<td align="left" valign="top"> | </td>
<td align="left" valign="top">
<a href="http://www.pinterest.com/" alias="Pinterest" target="_blank">
Pintrest
</a>
</td>
<td align="left" valign="top"> | </td>
<td align="left" valign="top">
<a href="https://twitter.com/" alias="Twitter" target="_blank">
Twitter
</a>
</td>
</tr>
</table>
</td>
</tr>
<!--EMAIL, PHONE NUMBER/-->
<tr>
<td align="center" valign="top">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="drop" align="left" valign="top" style="font-size:14px;font-family:arial,sans-serif;color:#6ebe43;padding:0 20px 0 0;">
customerservice#arbitraryLink.com
<span style="font-size:14px;font-family:arial,sans-serif;color:#000001">
| 1.888.777.6666
</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" valign="top">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td class="drop" align="center" valign="middle">
<!--CTA BUTTON/-->
<br>
<br>
<table cellpadding="0" cellspacing="0" border="0" class="pushto100">
<tr>
<td align="left" valign="middle" style="padding:0 10px">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td align="center" valign="top" style="font-size:12px;color:#88ab00;font-family:arial,sans-serif;font-weight:bold;">
<span style="text-decoration: none;color:#88ab00;">
sign up for emails</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--<br><br>-->
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="640" align="center" valign="top" style="font-size:11px;font-family:arial,sans-serif;color:#6ebe43;padding:16px 4px;">
<span style="color:#333333; width:640px;">
*Terms and conditions apply
<br><br>
This email was sent by: %%member_busname%%, %%member_addr%% %%member_city%%, %%member_state%% %%member_postalcode%% %%member_country%%</span>
<br>
<span style="color:#333333;">
This email was sent to: <strong>%%emailaddr%%</strong></span><span style="color:#333333;">. We respect your right to privacy -</span> privacy policy
<br>
<br>
One-Click Unsubscribe
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--CENTER EMAIL_end-->
%%[ var #additionalattribute1, #additionalattribute2, #additionalattribute3, #additionalattribute4 Set #additionalattribute1 = __AdditionalEmailAttribute1 Set #additionalattribute2 = __AdditionalEmailAttribute2 Set #additionalattribute3 = __AdditionalEmailAttribute3 Set #additionalattribute4 = __AdditionalEmailAttribute4 ]%%
<img src="http://track.securedopen-q.com/?sv_cid=0215_01811&sv_emopen=true&sv_svem=%%emailaddr%%&cm_source=tracking_pixel_stuff" height="1" width="1" />
</body>
</html>
You can see the white lines in my jFiddle when resizing the browser in chrome. http://jsfiddle.net/stormbloom/4s0sqkbb/
Please ignore the AMP script unless you think in could be causing rendering problems (which I doubt). I just left it in there so you can see what the entirety of the code looks like.
I discovered if I add an in-line style: outline 1px solid #f00; to the table, it fixes the white line issue. The problem is that many email clients do not support outline, but they add a space where outline is being used. So it causes the table you target to have a noticeable white space in that email client.
To fix this issue and only target iphone and devices using webkit is to create a class called .iphone and add it to a media query which targets iPhone 5, 6 and 6 plus.
#media only screen and (max-width: 414px) {
.iphone {
outline: 1px solid #f00;
}
Add the class "iphone" to the table with the white line issue. This fixes the white line issue and only shows on devices that can work with that media query. This tested with Litmus and with observing on the actual devices.

problems with outlook and emails

New to coding and i can not for the life of me see why this email is not working in outlook 2010, it's just the top part as well, any advise on how to fix this or
<table>
<tr>
<td valign="top" width="15px"> </td>
<td width="50">
<img alt="" height="99" src="http://www.uploadlibrary.com/first4families/TCM-Test/cell_03.png" width="123" /></td>
<td align="right" valign="top" width="585"></td>
</tr>
</table>
<table bgcolor="#5BBBB7" cellpadding="0" cellspacing="0" style="width: 600px">
<tr>
<td height="340px" width="600px">
<table align="center" cellpadding="0" cellspacing="0" style="width: 574px">
<tr>
<td colspan="3" style="height: 32px; width: 574px">
<img alt="" height="32" height="32px" src="http://www.uploadlibrary.com/first4families/TCM-Test/cell_07.png" width="574" /></td>
</tr>
<tr>
<td rowspan="2" style="height: 279px; width: 13px">
<img alt="" height="279" src="http://www.uploadlibrary.com/first4families/TCM-Test/cell_09.png" width="13" /></td>
<td align="left" bgcolor="#ffffff" style="padding-top: 10px; padding-left: 10px; padding-right: 10px" style="display: block; font-family: Tahoma, Verdana, Segoe, sans-serif; font-size: 12px; color: #000000; line-height: 14px; height: 212px;" valign="top" width="218px">
</td>
<td rowspan="2" style="height: 279px; width: 343px">
<img alt="" height="279" src="http://www.uploadlibrary.com/first4families/TCM-Test/cell_11.png" width="343" /></td>
</tr>
<tr>
<td style="height: 67px; width: 218px">
<img alt="" height="67" src="http://www.uploadlibrary.com/first4families/TCM-Test/cell_12.png" style="display: block" width="218" /></td>
</tr>
</table>
I don't think Outlook accepts height / width CSS, so stick to the HTML attributes instead.
Also- take the px off of your html attributes, that should solve a chunk of it.
Set display:block on all your images too, and if I remember correctly Outlook isn't great at rowspan - try and separate your tables rather than trying to have rows with different amounts of columns.

Creating Adaptive Table Based Floating Column Email without Media Query

Unfortunately the program I use to send out email does not allow for #media queries nor .css lists at the top of said code. This is problematic seeing as I am building an email template based around floating columns. I would like for the two columns to be next to one another while viewing on a tablet or desktop, but have the list drop underneath the content panel while viewing on a mobile device.
Here is the base of what I have:
<div style="width: 100%; max-width: 650px; margin-left: auto; margin-right: auto;">
<table cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td colspan="1" style="width: 100%;">
--banner image here--
</td>
</tr>
</tbody>
</table>
<table style="width: 100%;">
<tbody>
<tr>
<td align="left" valign="top" width="320px;" style="padding-left: 10px; padding-right: 10px;">
--content goes here--
</td>
<td align="left" valign="top" width="180px;" style="padding-left: 10px; padding-right: 10px;">
--list of links--
</td>
</tr>
</tbody>
</table>
</div>
It's doable. Without media queries you will be limited to how involved you get. This would work well if your columns were of equal width. I'm not sure how your design is, but without a media query it will be challenging to make even columns. Here is some roughed out HTML to get you going.
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
</head>
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 650px;">
<tr>
<td width="650">
<table cellpadding="0" cellspacing="0">
<tr>
<td colspan="1" style="width: 100%;"> --banner image here-- </td>
</tr>
</table>
<table align="left" width="320">
<tr>
<td align="left" valign="top" width="320" bgcolor="#00CC99" style="padding-left: 10px; padding-right: 10px;"> --content goes here-- </td>
</tr>
</table>
<table align="left" width="180">
<tr>
<td align="left" valign="top" width="180" bgcolor="#99CC33" style="padding-left: 10px; padding-right: 10px;"> --list of links-- </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>