repeater tag causing rendering issue with h1 margins (outlook 2007)

Hi folks,

I've only recently begun coding new templates and I'm finding it to generally be very easy (never thought I'd say that about HTML email!) however I'm running into a strange bug.

The template I'm working on right now began with only one $title and $description and everything looked fine, but when I wrap the code with the repeater the margin-bottom I've applied to the h1 containing the $title seems to disappear when viewing in Outlook 2007.

Here's my CSS for the element:

h1 {font-size: 16px !important; margin-bottom: 13px !important; font-weight: bold !important; color: #FFFFFF !important;}

And here's my repeater snippet:

<repeater toc='false'>
    <div class="entry">
        <h1><$title link='false' default='Enter your title'$></h1>
            <$description default='<p>Enter your content</p>'$>
    </div>
</repeater>

Any ideas? I can't see what's causing it.


Cheers,
Rab

Rab Simpson, 5 years ago

Just inspected the raw source of each of the test emails (with and without the repeater) and I notice that the $title elements have an anchor added when you use the repeater, could this have anything to do with it?


Cheers,
Rab

Rab Simpson, 5 years ago

I've managed to get around it by just applying top margin to the paragraphs instead.


Cheers,
Rab

Rab Simpson, 5 years ago

OK it looks like Hotmail doesn't like that. Wonderful...

Rab Simpson, 5 years ago

I've now reverted back to the bottom margin for the sake of Hotmail and I've wrapped the h1 in a div so I can apply the bottom margin that was previously missing to that. At this point, all the clients seem happy!


Cheers,
Rab

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098