0

I'm getting double spacing in Outlook 2007/2010/2013 and GMail but it looks fine elsewhere. I'm creating a newsletter and I've tried all-sorts: border-collapses, margins, paddings, spans, and still can't get my head around this. Can anyone see where I'm going wrong? Am I missing something?

Link below - source code too long to paste here. Sorry.

http://pastebin.com/FW3RgYuv

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
mjcoder
  • 1,009
  • 9
  • 25
  • 45

1 Answers1

4

For one, all styles must be inline. Most mail clients do not support stylesheets.

You are not building a web page, you're building an email, therefore everything in your HEAD section will be removed, including your embedded stylesheet.

In you code you have </br>. This is not a valid tag. Use <br />.

NEVER NEVER use !important. Inline styles already override other styles, plus you can dig yourself into a dead end.

Put your text in a DIV or a P and style that, not the TD. Not all styles are supported by every mail client. Here's a good list to compare to.

Diodeus - James MacFarlane
  • 112,730
  • 33
  • 157
  • 176
  • Anywhere a

    has been mentioned in the HTML have been replaced with the P Tags correctly.
    – mjcoder Mar 19 '13 at 14:48
  • well I've taken the

    tags and correctly used the
    tags as mentioned - just going to test the email now.

    – mjcoder Mar 19 '13 at 15:10
  • I would advise against using

    's within an email. Email clients are inconstant with their styling. I've not had an issue with styles on

    s (aside from the limited mail client support).
    – samanthasquared Mar 19 '13 at 17:19
  • @samanthasquared I've always used tags exclusively for text styling - Could you elaborate on which clients do/do not support styling? If it is just Lotus "who cares" Notes for example, it might be worth the switch... – John Mar 19 '13 at 21:44
  • I put all my styles inline on s. I don't use or

    . I don't use because it works just fine on

    but with less code since the table has to be there anyway. I've seen

    randomly add padding/margin/resize text, same with pretty much all semantic tags. You are fortunate if you don't have to be concerned with Lotus Notes, but I find if it works in Outlook '07 & '10, then it is decent in Notes too.

    – samanthasquared Mar 20 '13 at 01:00
  • @samanthasquared Lotus notes only makes up 0.2% of my B2B lists (and less for the older Lotus versions), so those <2 in every thousand need to upgrade imo ;) - I like .png's too much. I'll have to give dropping the font tag a try, although I do like separating structure from content as it makes coding easier. – John Mar 21 '13 at 14:43