I am having strange issue with some HTML emails that has me baffled. This is specific to Outlook2007-2013, in all other email clients the emails perform as expected.
I could summarize the issue as being two fold:
- If I have text context inside a cell , even if there are no long words and the cell has an explicit width set , the cell expands horizontally and breaks the layout.
- When I have cells that are single column and other rows have multi column cells, ( for example a row might contain a single cell with colspan=â2â, and the others contain two cells with no colspan) mystery (horizontal) space is added between the two table cells.
as a code sample :
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="textEdit" style="margin: 0px auto; table-layout: fixed;">
<tbody>
<tr>
<td style="color: #000000;"><span> </span></td>
<td style="color: #000000;" width="640">
<table style="width: 640px; margin: 0 auto; table-layout: fixed;" border="0" width="640" cellspacing="0" cellpadding="0" id="Table_01">
<tbody>
<tr>
<td colspan="2"><img width="640" src="http://placehold.it/640x407" align="bottom"></td>
</tr>
<tr>
<td colspan="2"><img width="640" src="http://placehold.it/640x520" align="bottom"></td>
</tr>
<tr>
<td width="320"><a shape="rect" href="https://sample-link.com"><img width="320" src="http://placehold.it/320x248" align="bottom"></a></td>
<td width="320"><a shape="rect" href="https://sample-link.com"><img width="320" src="http://placehold.it/320x248" align="bottom"></a></td>
</tr>
<tr>
<td colspan="2"><img width="640" src="http://placehold.it/640x955" align="bottom"></td>
</tr>
</tbody>
</table>
</td>
<td style="color: #000000;"></td>
</tr>
</tbody>
</table>
In this case the two cells in the third row are displayedâ with spaceâ between the images ( so am guessing that each cell is stretched out thus causing the weird visual effect)
I have used CSS, HTML attributes, nested tables, but i am still at a loss, so any advice on the matter is greatly appreciated.