foundation-emails icon indicating copy to clipboard operation
foundation-emails copied to clipboard

Multilines buttons wrong alignment on Outlook

Open lbineau opened this issue 6 years ago • 3 comments

How can we reproduce this bug? Add long text in a button so it has multiple lines

Write out the HTML (or Inky code) that causes the issue.

<center>
  <button href="/" class="text-center">Lorem ipsum dolor sit amet, <br/>consectetur adipisicing elit. <br/>Veniam rerum culpa</button>
</center>

What did you expect to happen? The text inside the button should be centered.

What happened instead? The text inside the button is left aligned. screenshot

What email clients does this happen in? Windows Outlook (2010 / 2013)

lbineau avatar Aug 18 '17 08:08 lbineau

Hmm, have you researched anything that might cause this? Seems like it's specific to Outlook so there must be a report of it somewhere. Let know what you find!

rafibomb avatar Sep 27 '17 16:09 rafibomb

I have the same problem, but everywhere. in litmus and also local browser. text-align: left is inlined in the element. maybe an inline issue?

elcaptain avatar Aug 19 '20 15:08 elcaptain

A possible fix is to add table.button.text-center > tbody > tr > td > table > tbody > tr > td > a { text-align: center; } to your css to inline the desired css

elcaptain avatar Aug 19 '20 16:08 elcaptain