Reputation: 3547
I am trying to get rid of a 1px gap at the far right of a vml graphic that appears in Outlook 2010, 2013, 2016.
I understand that Outlook adds <p></p>
automatically to the bottom of the xml, which is why I zeroed out the font-size and the line-height, which fixes the gap at the bottom. Any suggestions on what else might be automatically added that might add the space?
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
<v:polyline style="width: 500px; 24px; display: inline-block; padding-right: 0pt; border: 0pt !important;" fillcolor="#563d82" strokecolor="#563d82" strokeweight="0pt" stroke="false" coordorigin="0 0" coordsize="24 500" v:borderrightcolor="#ff0000" points="0pt,24pt, 500pt,24pt, 500pt,0pt, 0pt,24pt">
</v:polyline>
</xml>
Full html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
</head>
<body>
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; padding: 0px !important; margin: 0;">
<tr>
<td align="right" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0;">
<table cellpadding="0" cellspacing="0" border="0" align="right" width="498" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; padding: 0pt !important; margin: 0pt; overflow: hidden; display: inline-block;">
<tr align="right">
<td align="right" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; mso-margin-top-alt: 0pt; mso-margin-bottom-alt: 0px; padding: 0px !important; margin: 0; font-size: 0; line-height: 0; display: inline-block;">
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
<v:polyline style="width: 500px; 24px; display: inline-block; padding-right: 0pt; border: 0pt !important;" fillcolor="#563d82" strokecolor="#563d82" strokeweight="0pt" stroke="false" coordorigin="0 0" coordsize="24 500" v:borderrightcolor="#ff0000" points="0pt,24pt, 500pt,24pt, 500pt,0pt, 0pt,24pt">
</v:polyline>
</xml>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table bgcolor="#563d82" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; padding: 0px !important; margin: 0;">
<tr>
<td align="center">
<p class="footerlink" style="padding: 0px; color: #ffffff; font-size: 18px; line-height: 22px; text-align: left;">Placeholder text.</p>
</td>
</tr>
</table>
</body>
</html>
I should add this html is only visible in Outlook. I have a css graphic that covers every other browser. Too bad that doesn't work with Outlook.
Upvotes: 0
Views: 891
Reputation: 3547
Replacing the two tables for right alignment fixes the 1px gap on the far right.
<div align="right" style="font-size: 0; line-height: 0;">
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
<v:polyline fillcolor="#563d82" strokeweight="0pt" stroke="false" strokecolor="#563d82" style="font-size: 0; line-height: 0;" points="0pt,25pt 500pt,25pt 500pt,0pt 0pt,25pt"></v:polyline>
</xml>
</div>
This fixes the alignment issue for Outlook 2016 and Windows 10 Mail, but it leaves a hairline white line between the vml graphic and the table for Outlook 2010 and 2013. I have tried adding css and table borders, but it doesn't fix the problem.
Upvotes: 0