Nested Tables in IE width incorrect - html

I am having trouble getting a table to correctly nest inside another in IE, but it works fine in Firefox and Chrome. For some reason IE is showing the cell with the nested table as much wider then it is set to be.
Simplified version of my code:
<table width="575" border="0">
<tbody>
<tr>
<td height="10" colspan="3"><span style="FONT-SIZE: 12px"><span style="FONT-FAMILY: Arial">CITY (Arial, small, all caps), Country (only if city isn't well known, Arial, small) - Content text (Arial, small) First paragraph is to be full width and above any images or related boxes, unless there is a lead.<br />
</span></span></td>
</tr>
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td width="280"><span style="font-size: 12px;"><span style="font-family: Arial;">Half-width items: Text next to images or related boxes is to match or slightly exceed height of image or related box it sits next to with the tops set to align. First half-width image in an article or any related box goes on the right side of the page. </span></span></td>
<td width="10"></td>
<td width="260" valign="top">
<table width="260" border="0">
<tbody>
<tr>
<td>
<div style="width:260px;border:2px groove black;padding:5px;"><strong><span style="font-size: 14px;"><span style="font-family: Arial;">Related Links - Arial, medium, bold</span></span></strong><br />
<span style="font-family: Arial;"><span style="font-size: 12px;"><span style="font-size: 2px;"><br />
</span> • To be used when relevant links exist<br />
<span style="font-size: 2px;"><br />
</span> • Links to remain one line or shorter<br />
<span style="font-size: 2px;"><br />
</span> • Link text - Arial, small, linked<br />
</span></span></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td height="10" colspan="3"></td>
</tr>
</tbody>
Thank you for any help. I just can't figure out why IE won't play the same as the other browsers.

FYI, you can achieve this in CSS without using tables.
I changed the width from pixels to percentage and it works fine in IE now...
<tr>
<td width="44%"><span style="font-size: 12px;"><span style="font-family: Arial;">Half-width items: Text next to images or related boxes is to match or slightly exceed height of image or related box it sits next to with the tops set to align. First half-width image in an article or any related box goes on the right side of the page. </span></span></td>
<td width="2%"></td>
<td width="44%" valign="top">
<table width="100%" border="0">
<tbody>
<tr>
<td>
<div style="width:260px;border:2px groove black;padding:5px;"><strong><span style="font-size: 14px;"><span style="font-family: Arial;">Related Links - Arial, medium, bold</span></span></strong><br />
<span style="font-family: Arial;"><span style="font-size: 12px;"><span style="font-size: 2px;"><br />
</span> • To be used when relevant links exist<br />
<span style="font-size: 2px;"><br />
</span> • Links to remain one line or shorter<br />
<span style="font-size: 2px;"><br />
</span> • Link text - Arial, small, linked<br />
</span></span></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
Not sure why you are using colspan="3" while you can do away with two.
Anyway, test the above code to check if this is what you are after...
Thanks.
ADDED:
I removed the width for the td's and that works fine as well. Not sure why IE is rendering it differently when the width is supplied.
<tbody>
<tr>
<td height="10" colspan="3"><span style="FONT-SIZE: 12px"><span style="FONT-FAMILY: Arial">CITY (Arial, small, all caps), Country (only if city isn't well known, Arial, small) - Content text (Arial, small) First paragraph is to be full width and above any images or related boxes, unless there is a lead.<br />
</span></span></td>
</tr>
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td><span style="font-size: 12px;"><span style="font-family: Arial;">Half-width items: Text next to images or related boxes is to match or slightly exceed height of image or related box it sits next to with the tops set to align. First half-width image in an article or any related box goes on the right side of the page. </span></span></td>
<td></td>
<td valign="top">
<table border="0">
<tbody>
<tr>
<td>
<div style="width:265px;border:2px groove black;padding:5px;"><strong><span style="font-size: 14px;"><span style="font-family: Arial;">Related Links - Arial, medium, bold</span></span></strong><br />
<span style="font-family: Arial;"><span style="font-size: 12px;"><span style="font-size: 2px;"><br />
</span> • To be used when relevant links exist<br />
<span style="font-size: 2px;"><br />
</span> • Links to remain one line or shorter<br />
<span style="font-size: 2px;"><br />
</span> • Link text - Arial, small, linked<br />
</span></span></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td height="10" colspan="3"></td>
</tr>
</tbody>

Related

When I shrink the page my button overlaps

button overlapping image
When I shrink the page my button overlaps. Here is the relevant html:
<tr>
<td>
<table style="width:100%;">
<tr align="center">
<td class="hide-mobile-cell" align="left" style="padding:25px;max-width: 60%;font-family: sans-serif;">
<td style="font-family: sans-serif;">
MY WEBSITE
</td>
<td style="padding:25px;">
<p style="font-family: sans-serif;">This will link to my website. </p>
</td>
</table>
</tr>
<tr>
<td style="padding-right: 25px;padding-left: 25px;font-family: sans-serif;">
I want to make it so that my button is responsive and does not overlap.
Try adding the white-space: nowrap property on your <a> tag:
<tr>
<td>
<table style="width:100%;">
<tr align="center">
<td class="hide-mobile-cell" align="left" style="padding:25px;max-width: 60%;font-family: sans-serif;">
<td style="font-family: sans-serif;">
MY WEBSITE
</td>
<td style="padding:25px;">
<p style="font-family: sans-serif;">This will link to my website. </p>
</td>
</table>
</tr>
<tr>
<td style="padding-right: 25px;padding-left: 25px;font-family: sans-serif;">
This is happening because you have given fixed padding to the button so it will take the exact size as it was taking in fullscreen mode.
read Media Queries and you will understand what to do.
Still I will give you a short idea of what to do!
resize the screen size to the point where you feel like the media query needs to be applied and then fix the padding and font size inside that media query so that the button stays in a single line.
Let me know if you don't understand this quite properly, I'll be happy to help you!

Image in HTML email signature varies in size

In the email signature I'm making for my company I have an embedded image on the left. When I preview the code in Chrome or my IDE the image is sized properly taking up the same height as the three lines of evenly-spaced text to its right. However, when others in my company receive emails from me, sometimes the image is significantly taller than the lines of text next to it. How do I ensure that my image stays a consistent size across devices and email clients?
<html>
<STYLE>A {text-decoration: none;} </STYLE><body>
<table data-mysignature-date="2019-09-17T19:52:14.752Z" data-mysignature-is-paid="0" width="500" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td
valign="center" width="0" style="padding:0 8px 0 0;vertical-align: middle;"><img alt="TETON Sports" width="100" style="width:67px;" src="https://tetonsports.imagerelay.com/ql/88530bbf8421421caccd471108c1fc18/email-icon.png">
</td>
<td style="font-size:1em;padding:0 0 0 0;vertical-align: top;" valign="top">
<table cellspacing="0" cellpadding="0" border="0" style="line-height: 1.4;font-family:Verdana, Geneva, sans-serif;font-size:90%;color: #000001;">
<tr>
<td>
<div style="font: 1.0em Helvetica, Geneva, sans-serif;color:#000001;">
[COMPANY NAME]
</div>
</td>
</tr>
<tr>
<td style="padding: 0px 0;">
<div style="color:#000001;font-family:Helvetica, Geneva, sans-serif;">
<b> Austin Berenyi </b>
<span style="color:#FF9E18;font-family:Helvetica, Geneva, sans-serif;"> <b>//</b> </span>
<span style="color:#54565A;font-family:Helvetica, Geneva, sans-serif;"> <i>Graphic Designer</i> </span>
</div>
</td>
</tr>
<tr>
<td>
<span style="font: 1.0em Helvetica, Geneva, sans-serif;color:#54565A;" <span><i>austin#company.com</i></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
It may sounds naive, but just try to specify height of your img:
<img alt="TETON Sports" style="width:67px; height: 48px;" src="https://tetonsports.imagerelay.com/ql/88530bbf8421421caccd471108c1fc18/email-icon.png">
In addition try to always set font-size of text (px or em) and try to avoid these values as percents.

Styling button with border & offset using email HTML

I have a design of an email template, and I am tinkering about the best way to tackle the styling of the following element in HTML/CSS. Note a few things:
Since it's for an HTML email, mainly tables will be used.
Using negative margins will probably not be compatible with different mail clients.
Note the white border around the button
Would you recommend using a background image for this entire block? Or is there an elegant way that will look like this and works across clients.
Here's my set-up: http://jsfiddle.net/ZHkdV/
Here you go - only need a 30x30 image for the top corner:
<table width="300" border="0" cellpadding="0" cellspacing="0" bgcolor="#F1F1F1">
<tr>
<td width="30" height="30">
<img style="margin: 0; border: 0; padding: 0; display: block;" src="" width="30" height="30" alt="">
</td>
<td width="240" height="30">
</td>
<td width="30" height="30">
</td>
</tr>
<tr>
<td width="30" height="160">
</td>
<td width="240" height="160" valign="top">
<font style="font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #757575;">
<br>
some text here
</font>
</td>
<td width="30" height="160">
</td>
</tr>
<tr>
<td width="300" height="40" colspan="3" bgcolor="#FFFFFF"><!-- undeclared light gray as Outlook can add spaces at bottom of this td on forwarding (hides unwanted line) -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="50" height="20" bgcolor="#F1F1F1">
</td>
<a href="" style="color: #757575; font-weight: bold; text-decoration: none;"><!-- css button, you can lose this and put a href'd image in the cell if you prefer. -->
<td width="200" height="40" bgcolor="#CBBCDC" rowspan="2" valign="middle" align="center">
<font style="font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #757575;">
BUTTON
</font>
</td>
</a>
<td width="50" height="20" bgcolor="#F1F1F1">
</td>
</tr>
<tr>
<td width="50" height="20" bgcolor="FFFFFF">
</td>
<td width="50" height="20" bgcolor="FFFFFF">
</td>
</tr>
</table>
</td>
</tr>
</table>
This should hold up in all clients...
For e-mail templates, you don't have to worry about validation, so you can use pretty 'hacky' html. One way round client compatibility is to have every row be a table in and of itself, set inside one main 'wrapper' table.
Then you can set as many divisions as you want in each, remembering to reset the borders on each table, row and cell.
Each cell gets it's own image or slice of an image. For the last row you could simply have one image in an anchor tag. Also remember to keep all styling on elements inline.
The html email Boilerplate is pretty much bulletproof.
http://htmlemailboilerplate.com/
<table> <!- Wrapper ->
<tr>
<td>
<table>
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
Background images aren't very compatible either:
http://www.campaignmonitor.com/css/
I would just slice the last row into 3 separate images (left, button, right).
If you would rather have one image for the whole row, you can also use an image map to just make the button part a link.

HTML Email in iOS

I am getting a line across a table I made in an html email. It is in the orange area. I'm not really sure what is causing is. There is no images in there. Here is my code for that table.
<table cellpadding="0" cellspacing="0" border="0" width="625" align="center" bgcolor="#FFFFFF">
<tr>
<td height="23" bgcolor="#f08122" colspan="3"> </td>
</tr>
<tr>
<td width="23" bgcolor="#f08122"></td>
<td bgcolor="#f08122" valign="middle" style="font-family:Helvetica, Arial, sans-serif; color:#FFFFFF;" align="center"><span style="font-size:30px; line-height:36px; font-weight:bold;"><strong>Improve outcomes and empower patients with health logs</strong></span><br /><br />
<span style="font-size:27px;">Order now and get <strong>10% more FREE!*</strong></span></td>
<td width="23" bgcolor="#f08122"></td>
</tr>
<tr>
<td height="23" bgcolor="#f08122" colspan="3"> </td>
</tr>
<tr>
<td height="5" colspan="3"></td>
</tr>
</table>
Here is the link to the actual email also if you wanted an active view: https://tagwebstore.com/email/tag-email-logbooks.html
Here is a screenshot of the html email from my iPhone.
The lines appear to be above and below the white text. Any ideas? Thanks in advance.
The borders appear when a background color or image is applied to individual table cells.
you can try:
Removing background colors or images from individual table rows and
cells, and/or;
Nesting the problem table in a new table, featuring a background color that matches that of the inner table.
source
Also, setting style="display: block;" on the img element consistently helps all images position exactly, in tandem with the above suggestions.

HTML e-mail template

I know this is pushing reality a bit, but I need to ask this question...
Is it possible to have a fixed background image with no-repeat on, and with a table in front of the image?
My problem at the moment is, that if the table in front of the current image gets to long, (longer than the image height) then the image repeats it self downwards and it looks really ugly and unprofessional.
Div is out of the question, it doesn't work with e-mails that well.
The image is basically from top to bottom a black to light blue shade image.
below is the html template i'm using to merge with my outlook email.
<body style="background: transparent url(<MY IMAGE>;);">
<table align="center" border="0" cellpadding="0" cellspacing="0" width=700">
<tbody style="text-wrap:normal;word-wrap:break-word">
<tr>
<td>
<font face="Verdana"><img height="20" src="<MY IMAGE>" style="width: 700px; height: 20px;" width="1" /></font></td>
</tr>
<tr>
<td>
<font face="Verdana"><img height="80" src="<MY IMAGE>" style="width: 750px; height: 80px;" width="750" /></font></td>
</tr>
<tr>
<td align="left" bgcolor="#FFFFFF" style="padding: 10px;">
<p>
<span style="font-size: 14pt;"><strong><span style="color: rgb(0, 0, 128);"><font face="Verdana">Place Heading here.</font></span></strong></span><br />
<br />
<span style="font-size: 10pt;"><span style="font-family: arial,helvetica,sans-serif;">Place text here.
Place text here.Place text here.
<br />
<br />
</span></span></p>
</td>
</tr>
<tr>
<td>
<font face="Verdana"><img height="90" src="<MY IMAGE>" style="width: 750px; height: 90px;" width="750" /></font></td>
</tr>
<tr>
<td align="left" bgcolor="#83B5D4" style="font-size: 9px; color: rgb(255, 255, 255);">
<font face="Verdana"><img height="10" src="<MY IMAGE>" style="width: 10px; height: 10px;" width="10" /></font></td>
</tr>
<tr>
<td align="center" bgcolor="#162C76" style="padding: 10px;" valign="middle">
<font color="#FFFFFF" face="Verdana" style="font-size: 10px; line-height: 1.5em;">Tel: +27 11 454 1074 | Fax: +27 11 454 1073 | support#psiber.co.za | www.psiberworks.com<br />
15 Seventh Avenue, Edenvale, 1610</font></td>
</tr>
</tbody>
</table>
</body>
The way I got around this was to add a load of colored padding to the image at the bottom. The cell will hide all this until it is pushed down and you don't have to worry about CSS styles not working in various email browsers.
Background images are a pain in a lot of email browsers. You can however 'hack' them into Outlook 2007 if you really need to - http://emailmarketingvoodoo.com/blog/post/outlook-2007-can-now-render-background-images/