Paragraph spacing in Yahoo

I'm in the habit of adding (maybe I don't have to any more or there is something better) of adding line-height and margin-bottom spacing to all paragraphs to account for Yahoo's spacing issues.

The problem is that when clients enter multiple p's in the editor, those p's don't have that. so I get spacing issues.

Here is the code I used for these sections:

<div style="font-size: 9pt; font-family: Geneva, Arial, Helvetica, sans-serif; line-height:1.3; margin-bottom:1em;"><$description default='<p>Enter News and Articles</p>'$></div>

What can I do to fix this and is there a better way to account for this?



davidaf davidaf, 7 years ago

Hi Brett,

If you want it on all paragraphs in that div, try adding the css to the p tags inside the div instead. In your CSS stylesheet in the head (which will automatically get added inline to all paragraphs) something along the lines of:

div.description p {
    font-size: 9pt;
    font-family: Geneva, Arial, Helvetica, sans-serif; 

Then in your code, you'll add the description class to the div and leave the rest alone:

<div class="description"><$description default='<p>Enter News and Articles</p>'$></div>

The Campaign Monitor Blog – HTML email smarts to go with your good looks
baatkin65, 7 years ago

That makes perfect sense, but I thought most email clients ignore anything outside the body tag?  Does CM apply all head styles inline before it sends?



Brett Atkin
Diana Diana, 7 years ago

Hi Brett,

Yes, all those styles in the head will be applied inline before sending. So you just want to add paragraph styling to your stylesheet and it'll be taken care of from there.

D. Potter
Campaign Monitor

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free