Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outlook (2013/2016/2019) shows 1px horizontal line at the bottom of cells #99

Open
uxgenesis opened this issue Aug 17, 2021 · 4 comments
Labels
Outlook Windows, macOS, iOS, Android and Outlook.com

Comments

@uxgenesis
Copy link

Occasionally Outlook 2013, 2016 and 2019 and Windows 10 Mail will show a 1px horizontal line on the bottom of cells, mostly when containing an image, with the border color having body background color.

If the table only contains an image, this can be solved by adding this to the table style attribute:
font-size:0;line-height:0

If the table contains other markup, add this to the section, and be sure to define the font-size and line-height on level:
<!--[if gt mso 15]> <style type="text/css" media="all"> /* Outlook 2016 Height Fix */ table, tr, td {border-collapse: collapse;} tr { font-size:0px; line-height:0px; border-collapse: collapse; } </style> <![endif]-->

@JayOram
Copy link

JayOram commented Aug 17, 2021

I'm not sure this is a 'bug' - more a rendering issue to take into account when building the email. This only occurs as Outlook Windows Desktop uses the 'Word rendering engine' and converts everything to points (pt) from pixels and when the numbers are odd or are rounded up/down, can cause some inconsistencies in the heights and cause 1px lines.

@uxgenesis
Copy link
Author

Thanks for your explanation. Isn't this an unintended side effect though with the background color appearing as a line? We have to take many of these irregularities into account when building e-mail templates, I think documenting this will help e-mail developers fix this issue in theirs?

@hteumeuleu hteumeuleu added the Outlook Windows, macOS, iOS, Android and Outlook.com label Feb 16, 2022
@ttntm
Copy link

ttntm commented Mar 15, 2022

I've had this happen as a result of multiple <tr> nodes that each had 2 <td> elements inside, one with an <img> and one with just text.

The 1px line would only appear on the second <tr> in Outlook 2019.

No changes to the CSS (global or inline) would get rid of it, the solution was moving each <tr> into its own <table> and stacking those on top of each other.

@JayOram
Copy link

JayOram commented Mar 28, 2022

We worked on this article with a bunch of possible fixes:
https://www.actionrocket.co/email-design-review/white-lines-in-outlook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Outlook Windows, macOS, iOS, Android and Outlook.com
Projects
None yet
Development

No branches or pull requests

4 participants