Table style border- outlook 2010 adds an extra spa

2019-06-17 19:08发布

I created an HTML for email marketing. I placed a table, and applied a border around it:

<table border="0" cellspacing="0" cellpadding="0" style="border:1px solid #982676; margin:0 16px;">

For some reason I am getting 1 pixel extra white space inside when I test it in OUTLOOK 2010. I see it around images that are aligned to the top and to the left, and I see it around other cells that have a solid background color.

See image at this link:screenshot

The top triangle is an image in a cell by itself. The bottom rectangle is a cell with a background color. These were supposes to stick to the border. This is a recurring problem. Has anyone encountered this issue before?

6条回答
放我归山
2楼-- · 2019-06-17 19:19

In case you haven't found a solution to this problem yet:

Make sure you set border="0" for those images within the table cells.

查看更多
地球回转人心会变
3楼-- · 2019-06-17 19:27

Campaign monitor has a really great solution on how to solve this type of problem. Simple add this style code to your table elements. The code below solved my problem (same as OP) on Outlook 2010

<table align="left" style="border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;"> ... </table>

http://www.campaignmonitor.com/blog/post/3694/removing-spacing-from-around-tables-in-outlook-2007-and-2010

If that doesn't work, try this. http://www.emailonacid.com/blog/details/C13/removing_unwanted_spacing_or_gaps_between_tables_in_outlook_2007_2010

查看更多
叼着烟拽天下
4楼-- · 2019-06-17 19:30

I found this here: http://www.emailonacid.com/blog/details/C13/7_tips_and_tricks_regarding_margins_and_padding_in_html_emails

" Table element margins and padding in Outlook 2007 and 2010 can cause issues

If you add margin or padding properties to your TABLE element, it will add that same margin and padding to every nested TD in Outlook 2007 and 2010. Cellpadding and cellspacing attributes are safe but it's best to avoid CSS margins and padding within the containing TABLE element."

So I guess your margin on the table could be causing this.I m not sure.

查看更多
在下西门庆
5楼-- · 2019-06-17 19:33

For borders of 1 and 3 pixel width, the right border has a 1 pixel space behind it. One solution for this (weird...) kind of problem is a "ghost table" behind the current table, with the width of the current table minus 1 and border of 1. For example:

<!--[if mso]><table border="1" width="699">
<tr style="display:none;"><td>&nbsp;</td></tr>
</table><![endif]-->

More details: https://responsive.email/blog/s/1025987_Extra-space-behind-border-in-Outlook.html

Good luck...

查看更多
ゆ 、 Hurt°
6楼-- · 2019-06-17 19:35

Add border-collapse:collapse; to the table style.

查看更多
可以哭但决不认输i
7楼-- · 2019-06-17 19:37

I solved this problem going into the table properties section and then clicking on "Options". Once the options box appears, change the default cell margins for Left and Right to 0" and then click OK.

查看更多
登录 后发表回答