Email Cross browser and cross client bugs - email

I'm creating an email template for a client. There are so many small bugs.
I can't get the side images to line up without having space between them and the tables width won't match up.
Check out the cross client previews here:
[removed]
and here is my code:
<table width="600" bgcolor="000000" style="padding-left: 14xpx;">
<tr>
<td align="left" cellspacing="0" cellpadding="0" style="padding: 5px 0 0 0;margin-bottom: 0;">
<ul style="padding:0;">
<li style="list-style: none;">
<span><img src="http://www.kieshajewel.com/sirio/left-img-01.jpg" alt=" Join Executive Chef Massimo Bebber" style="margin-bottom: -4px !important;"/></span></li>
<li style="list-style: none;"><span><img src="http://www.kieshajewel.com/sirio/left-img-02.jpg" alt=" Join Executive Chef Massimo Bebber" style="margin-bottom: -4px !important;"/></span><singleline /></li>
<li style="list-style: none;"><span><img src="http://www.kieshajewel.com/sirio/left-img-03.jpg" alt=" Join Executive Chef Massimo Bebber" style="margin-bottom: -4px !important;"/></span></li>
</ul>
</td>
<td align="left" cellspacing="0" cellpadding="0" style="padding: 10px 0 0 0; position: relative; left: -5px;">
<span>
<a href="http://siriony.com/sample-page/chef-massimo-bebber/" style="border: none !imporant;">
<img src="http://www.kieshajewel.com/sirio/chef-massimo-bebber.jpg" alt-"Sirio Chef" /></a>
</span>
</td>
<td align="left">
<img src="http://www.kieshajewel.com/sirio/sirio-thumbnails.png" alt="Sirio Ristorante" />
</td>
</tr>
</table>
<table width="605" bgcolor="000000" style="margin-top: -20px;">
<tr>
<td align="left"><img src="http://www.kieshajewel.com/sirio/lines.gif" /></td>
</tr>
</table>
<table width="606" bgcolor="000000" style="">
<tr>
<td align="left"> <img src="http://www.kieshajewel.com/sirio/footer-01.gif" alt="Reserve Now" />
<img src="http://www.kieshajewel.com/sirio/footer-02.gif" alt="Reserve Now" />
<img src="http://www.kieshajewel.com/sirio/footer-03.gif" alt="Reserve Now" />
<img src="http://www.kieshajewel.com/sirio/footer-04.gif" alt="Reserve Now" />
<img src="http://www.kieshajewel.com/sirio/footer-05.gif" alt="Reserve Now" />
<img src="http://www.kieshajewel.com/sirio/footer-06.gif" alt="Reserve Now" />
</td>
</tr>
</table>

There are so many problems in what you posted it's hard to tell exactly what it is you were trying to do.
The following is meant to be harsh:
First off, get everything laid out in the right spot before you start randomly adding negative positioning styles; there was no reason for that. Second, you might want to pick up a book on html and css before you take on another client. You have quite a bit to learn. Pay attention to text layout, image alignment and cell positioning.
The following gets rid of most of the garbage.
<table width="600" bgcolor="000000" style="padding-left: 14px;">
<tr>
<td align="left" valign="top" cellspacing="0" cellpadding="0" style="padding:0px;margin:0px;">
<img src="http://www.kieshajewel.com/sirio/left-img-01.jpg" alt=" Join Executive Chef Massimo Bebber" style="border:0px;margin:0px;" /><br />
<img src="http://www.kieshajewel.com/sirio/left-img-02.jpg" alt=" Join Executive Chef Massimo Bebber" style="border:0px;margin:0px;"/><br />
<img src="http://www.kieshajewel.com/sirio/left-img-03.jpg" alt=" Join Executive Chef Massimo Bebber" style="border:0px;margin:0px;"/>
</td>
<td align="left" valign="top" cellspacing="0" cellpadding="0" style="padding:0px;margin:0px;">
<span>
<img src="http://www.kieshajewel.com/sirio/chef-massimo-bebber.jpg" alt-"Sirio Chef" style="border:0px;" />
</span>
</td>
<td align="left" valign="top">
<img src="http://www.kieshajewel.com/sirio/sirio-thumbnails.png" alt="Sirio Ristorante" />
</td>
</tr>
<tr>
<td align="left" valign="top" colspan="3"><img src="http://www.kieshajewel.com/sirio/lines.gif" /></td>
</tr>
<tr>
<td align="left" valign="top" colspan="3"> <img src="http://www.kieshajewel.com/sirio/footer-01.gif" alt="Reserve Now" />
<img src="http://www.kieshajewel.com/sirio/footer-02.gif" alt="Reserve Now" />
<img src="http://www.kieshajewel.com/sirio/footer-03.gif" alt="Reserve Now" />
<img src="http://www.kieshajewel.com/sirio/footer-04.gif" alt="Reserve Now" />
<img src="http://www.kieshajewel.com/sirio/footer-05.gif" alt="Reserve Now" />
<img src="http://www.kieshajewel.com/sirio/footer-06.gif" alt="Reserve Now" />
</td>
</tr>
</table>

99% of the time there are spaces between images, it is because people forget display:block; on the image tags. In this case though, you are floating your images, which is the rare case where display block is not needed. I wouldn't recommend this technique in html email however, unless there is a lot of spare room, as different clients have slightly different spacing between images.
Put each of your images in their own table cell, and it should fix the problems:
<td width="">
<img alt="" src="" width="" height="" style="margin: 0; border: 0; padding: 0; display: block;">
</td>
If you still have issues, repost your code and I'll take another look at that point.

Related

how to I make sure facebook twitter etc icons in html email have a space between them

All the questions I've read on stackoverflow have had the opposite problem, of a space being added unnecessarily.
In my case, I tried adding styles to the email template to space out the icons, but none seem to work. For example:
<a href="http://www.instagram.com/thing" title="thing">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB;text-decoration:none;padding:0.2cm 0.2cm 0.2cm 0.2cm">
<img src="instagram.png" HSPACE="50" VSPACE="50">
</span>
</a>
<table cellpadding="0" cellspacing="0" border="0" width="300" align="center">
<tr>
<td width="280" align="center">
<table cellpadding="0" cellspacing="0" border="0" width="275">
<tr>
<td align="center">
<img src="https://gallery.mailchimp.com/71be465a8d8b6e9c35e279697/images/c7f897c9-5491-41c5-b73a-40d1e29f1185.png" width="32px" height="32px" alt="facebook" vspace="10" hspace="25"/>
</td>
<td width="20">
</td>
<td align="center">
<img src="https://gallery.mailchimp.com/71be465a8d8b6e9c35e279697/images/9c7aac20-d385-4bde-a0cf-1ddb7d6f7060.png" width="32px" height="32px" alt="Twitter" vspace="10" hspace="25"/>
</td>
<td width="20">
</td>
<td align="center">
<img src="https://gallery.mailchimp.com/71be465a8d8b6e9c35e279697/images/3b801696-a19c-4de3-adbe-c4cb9976d40b.png" width="32px" height="32px" alt="Instagram" vspace="10" hspace="25"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
Use nested tables and empty <td> with heights and/or widths. Tables are the best when it comes to HTML email.
I found the easiest way is to simply add a space PNG in between the icons.
This seems to work reliably in Outlook and Gmail.
<a href="http://www.instagram.com/thing" title="thing">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB;text-decoration:none;padding:0.2cm 0.2cm 0.2cm 0.2cm">
<img src="instagram.png" HSPACE="50" VSPACE="50">
</span>
</a>
<img src="space.png" HSPACE="50" VSPACE="50">

Image and table side-by-side, display:inline don't work in Outlook

I created a html email, it's working correctly in Thunderbird and Gmail but not in Outlook.
I want to have side by side one image and on table.
I use display:inline in order to do that.
But Outlook show the image and below the table.
Here the code:
http://jsfiddle.net/675db7ca/1/
<br/>
<div style="display:inline !important"><a href="http://www.google.com/" style="text-decoration:none">
<img border="0" height="106" width="186" src="http://pheonix.jw.lt/killercat186px.jpg" alt="logo"/>
</a></div><table cellspacing="0" style="table-layout: fixed; display:inline !important; max-width:412px; border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;" cellpadding="0" border="0" width="412">
<tbody>
<tr>
<td width="200" border="0" style="vertical-align: bottom">
<span style="font-family:Helvetica;font-size:17px;color:#000000;">Super Scral</span>
<br/>
<span style="font-family:Helvetica;font-size:16px;color:green;">Developper</span>
</td>
<td width="20" style="background-image: url('http://s.atchik-services.com/signature/signature_lignerouge.png');" rowspan="3">
<div id="lignerouge"></div>
</td>
<td width="150" rowspan="2" border="0">
<span style="font-family:Helvetica;font-size:12px; color:#000001;"><strong>Tel</strong> : <a style="line-height:12px;padding:0px;margin:0px;color:#000001;text-decoration:none;" href="tel:0033xxxxxxxx">+33 <strong>x xx xx xx xx</strong></a>
</span>
<br/>
<span style="font-family:Helvetica;font-size:12px; color:#000001;"><strong>Site</strong>:
<a style="line-height:12px;padding:0px;margin:0px;color:#000001;" href="http://www.google.com/">google.com</a></span>
</td>
</tr>
</tbody>
</table>
<br/>
Thanks!
I can't really understand what it is that you are asking for help on.
I'm guessing you want the image next to the text, rather than above...
Put the image in a cell in that same table
<table cellspacing="0" style="max-width:412px; border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;" cellpadding="0" border="0" width="412">
<tbody>
<tr>
<td><a href="http://www.google.com/" style="text-decoration:none">
<img border="0" height="106" width="186" src="http://pheonix.jw.lt/killercat186px.jpg" alt="logo"/>
</a></td>
<td width="200" border="0" style="vertical-align: bottom">
<span style="font-family:Helvetica;font-size:17px;color:#000000;">Super Scral</span>
<br/>
<span style="font-family:Helvetica;font-size:16px;color:green;">Developper</span>
</td>
<td width="20" style="background-image: url('http://s.atchik-services.com/signature/signature_lignerouge.png');" rowspan="3">
<div id="lignerouge"></div>
</td>
<td width="150" rowspan="2" border="0">
<span style="font-family:Helvetica;font-size:12px; color:#000001;"><strong>Tel</strong> : <a style="line-height:12px;padding:0px;margin:0px;color:#000001;text-decoration:none;" href="tel:0033xxxxxxxx">+33 <strong>x xx xx xx xx</strong></a>
</span>
<br/>
<span style="font-family:Helvetica;font-size:12px; color:#000001;"><strong>Site</strong>:
<a style="line-height:12px;padding:0px;margin:0px;color:#000001;" href="http://www.google.com/">google.com</a></span>
</td>
</tr>
</tbody>
</table>
Best not to bother with divs in email if you don't know a lot about email client quirks.
Display:inline/block/etc won't work on elements like tables. Don't bother with things like that.

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>

Search/form input in email design

This is an amazing email campaign from Bed Bath and Beyond!
It's because there could be no JS or PHP on email campaigns, and yet, there is a functioning search form.
So, does anyone know how it is done? I'm an email designer and I want to add in this feature to my company's newsletter..Thanks for the help!
Snippet of the Search Form in an email
<table width="650" cellspacing="0" cellpadding="0" border="0">
<tbody><tr>
<td bgcolor="#6699cc" colspan="9"><img style="display: block;" height="7" width="650" border="0" alt="" src="http://image.bedbathandbeyond.com/bedbathbeyond/2010/search_test/search_top.jpg"></td>
</tr>
<tr>
<td width="14"><img style="display: block;" height="33" width="14" border="0" alt="" src="http://image.bedbathandbeyond.com/bedbathbeyond/2010/search_test/search_left.jpg"></td>
<td bgcolor="#336699" width="272"><input class="search" size="36" name="sstr" value="enter keyword" style="display:block; width:240px;"></td>
<td bgcolor="#336699" width="22"><img style="display: block;" height="33" width="13" border="0" alt="" src="http://image.bedbathandbeyond.com/bedbathbeyond/2010/search_test/spacer.gif"></td>
<td width="71"><input id="SEARCH" title="SEARCH" type="image" height="33" alt="SEARCH" width="71" src="http://image.bedbathandbeyond.com/bedbathbeyond/2010/search_test/search_submit.jpg" border="0" name="SEARCH" style="display:block"></td>
<td bgcolor="#6699cc" width="7"><img style="display: block;" height="33" width="7" border="0" alt="" src="http://image.bedbathandbeyond.com/bedbathbeyond/2010/search_test/spacer.gif"></td>
<td width="134"><img style="display: block;" height="33" width="134" border="0" alt="Shop By Brand" src="http://image.bedbathandbeyond.com/bedbathbeyond/2010/search_test/search_bybrand.jpg"></td>
<td bgcolor="#6699cc" width="7"><img style="display: block;" height="33" width="7" border="0" alt="" src="http://image.bedbathandbeyond.com/bedbathbeyond/2010/search_test/spacer.gif"></td>
<td width="116"><a hrefenter code here="http://bargainswoop.com/go-to/?http://www.bedbathandbeyond.com/nodePage.asp?order_num=-1&RN=856?utm_source=e&utm_medium=e&utm_term=e&utm_content=headerfooter&utm_name=JulyCirc" target="_blank" rel="nofollow"><img style="display: block;" height="33" width="116" border="0" alt="What's New" src="http://image.bedbathandbeyond.com/bedbathbeyond/2010/search_test/search_whatsnew.jpg"></a></td>
<td bgcolor="#6699cc" width="7"><img style="display: block;" height="33" width="7" border="0" alt="" src="http://image.bedbathandbeyond.com/bedbathbeyond/2010/search_test/spacer.gif"></td>
</tr>
<tr>
<td bgcolor="#6699cc" colspan="9"><img style="display: block;" height="7" width="650" border="0" alt="" src="http://image.bedbathandbeyond.com/bedbathbeyond/2010/search_test/search_bottom.jpg"></td>
</tr>
</tbody></table>
The form should be just a normal form, there are no tricks there.
check out this article from css tricks.
The problem is a matter of compatibility, email clients are difficult since they don't follow the same standards many times. You should go one by one through the clients you want to support and see if you are happy with the results.
I'm trying it out in quite a few and will post a (short) list a little in a while.
Please note that as the article says there might be some warnings in some email clients.
Gmail - Works with warning.
Hotmail - Doesnt seem to work (looking for a workaround).
(work in progress)
Compatibility table taken from campaign monitor:
I think it will be your decision based on the knowledge of your database.
But in conclusion it might not be a good idea since it might be quite annoying to the users that can't see it or can't use it, there are simply too many email clients that don't follow the same standards.

Jquery parent child selectors

I have the html structure below and I'm trying to select the row containing the text 'Related list item:'.
My Jquery is below:
$('#WebPartWPQ3 > table(eq:2) > tbody > tr > td > table > tbody > tr:last').remove();
but not working...
<DIV id="WebPartWPQ3" fixed_bound allowDelete="false" OnlyForMePart="true" HasPers="true" WebPartID="00000000-0000-0000-0000-000000000000" width="100%">
<TABLE cellSpacing="0" cellPadding="4" width="100%" border="0" fixed_bound xmlns:ddwrt2="urn:frontpage:internal" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:x="http://www.w3.org/2001/XMLSchema">
<TBODY fixed_bound>
<TR fixed_bound>
<TD class="ms-vb" fixed_bound>
</TD>
</TR>
</TBODY>
</TABLE>
<TABLE width="100%" border="0" fixed_bound xmlns:ddwrt2="urn:frontpage:internal" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:x="http://www.w3.org/2001/XMLSchema">
<TBODY fixed_bound>
<TR fixed_bound>
<TD fixed_bound>
<TABLE cellSpacing="0" width="100%" border="0" fixed_bound>
<TBODY fixed_bound>
<TR fixed_bound>
<TD class="ms-formlabel" vAlign="top" noWrap width="25%" fixed_bound>
<B fixed_bound>Title:
</B>
</TD>
<TD class="ms-formbody" vAlign="top" width="75%" fixed_bound>Employee annual leave approval
<BR fixed_bound/>
<BR fixed_bound/>
</TD>
</TR>
<TR fixed_bound>
<TD class="ms-formlabel" width="25%" fixed_bound>
<B fixed_bound>Approved Carry Forward days
<SPAN class="ms-formvalidation" fixed_bound> *
</SPAN>:
</B>
</TD>
<TD class="ms-formbody" width="75%" fixed_bound>
<SPAN fixed_bound>
<INPUT class="ms-input" id="ctl00_PlaceHolderMain_TaskForm_ff1_1_ctl00_ctl00_TextField" title="Approved Carry Forward days" style="IME-MODE: inactive" size="11" name="ctl00$PlaceHolderMain$TaskForm$ff1_1$ctl00$ctl00$TextField" fixed_bound value=""/>
<BR fixed_bound/>
</SPAN>
</TD>
</TR>
<TR fixed_bound>
<TD class="ms-formlabel" width="25%" fixed_bound>
<B fixed_bound>Review Comments:
</B>
</TD>
<TD class="ms-formbody" width="75%" fixed_bound>
<SPAN fixed_bound>
<TEXTAREA class="ms-long" id="ctl00_PlaceHolderMain_TaskForm_ff2_1_ctl00_ctl00_TextField" title="Review Comments" name="ctl00$PlaceHolderMain$TaskForm$ff2_1$ctl00$ctl00$TextField" rows="5" fixed_bound>
</TEXTAREA>
<BR fixed_bound/>
</SPAN>
</TD>
</TR>
<TR fixed_bound>
<TD class="ms-formlabel" vAlign="top" noWrap width="25%" fixed_bound>
<B fixed_bound>Related list item:
</B>
</TD>
<TD class="ms-formbody" vAlign="top" width="75%" fixed_bound>
<A href="http://orange.extra.net/people/hr/Workflows/Expire%20the%20employee%20year%20in%20a%20year/" fixed_bound>
</A>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing="0" cellPadding="4" width="100%" border="0" fixed_bound xmlns:ddwrt2="urn:frontpage:internal" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:x="http://www.w3.org/2001/XMLSchema">
<TBODY fixed_bound>
<TR fixed_bound>
<TD class="ms-vb" noWrap fixed_bound>
<INPUT style="DISPLAY: none" onclick="javascript: __doPostBack('ctl00$PlaceHolderMain$TaskForm','__update;__commit;__redirectsource;__redirectToList={};')" type="button" name="btnSave" fixed_bound jQuery1291028280448="3" value="Save Draft"/>
</TD>
<TD fixed_bound>
<INPUT onclick="javascript: __doPostBack('ctl00$PlaceHolderMain$TaskForm','__update;__workflowTaskComplete={0*};__commit;__redirectsource;__redirectToList={};')" type="button" name="btnMarkSubmited" fixed_bound value="Complete Task"/>
</TD>
<TD class="ms-vb" noWrap width="99%" fixed_bound>
<INPUT onclick="javascript: __doPostBack('ctl00$PlaceHolderMain$TaskForm','__cancel;__redirectsource;__redirectToList={};')" type="button" name="btnCancel" fixed_bound value="Cancel"/>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
$('.ms-formlabel').last().children().remove();
I prefer to give an id to the tr and remove the tr by id.
$('#trid').remove();
$('#WebPartWPQ3').find('Related list item').closest('tr').remove();