user1754726
user1754726

Reputation: 41

Extra space added after link tag in html email

This regards HTML emails...

For some reason email-clients are adding an extra space after a text link.

Here's the code:

<a href="http://foo.com" target="_blank" style="text-decoration: none; font-family: Arial, Helvetica, sans-serif;font-weight:bold; font-size:12px; color:#249A10;">foo</a>

So clients will display this as 'foo '

Any ideas where this extra space comes from?

Upvotes: 4

Views: 8445

Answers (3)

NewBie_WannaBe
NewBie_WannaBe

Reputation: 83

add a whitespace nowrap fixed the issue for me.

<span style="white-space: nowrap;"><a href="https://www.example.com/" style="font-family: Arial;font-size: 12px;line-height: 16px;color: #221e1f;text-decoration: underline;cursor: pointer;">https://www.example.com/</a>.</span>

Hope this helps to fix the 10+ years old issue

Upvotes: 0

Deniss Baronov
Deniss Baronov

Reputation: 122

Try to use display: block; or display: inline-block; for your a tag.

Upvotes: 2

defau1t
defau1t

Reputation: 10619

It won't show the white space in its current form. If you have wrapped your a tag within td or span, you may have missed something there. I mean the container of a tag, otherwise it should just work fine.

Upvotes: 0

Related Questions