Solution for adding margin-bottom to <p> (in some cases!)


I thought I would share a solution to a particular problem I've had that others may find useful.

My email design called for an editable anchor link aligned to the bottom of a table. This worked fine, except when the item was repeated, and the CM editor wrapped the link with a <p> tag (as CM requires an editable link to be wrapped in a <multiline> tag). ignored my attempts to set margin-bottom on the <p> to zero, so there was always an ugly gap under these links, breaking the design.

The solution I found was to add my own <p> tag around the link in the template, and set it to style="display: inline". The CM editor recognised that there was already a <p> so it left it alone!

The user is able to edit and change the link address, as long as they don't delete the link accidentally, thus removing the <p> set to display:inline.

No more gaps in Outlook!

roshodgekiss roshodgekiss, 3 years ago

Nice nice, skeg64 - thank you so much for posting your solution here! We'll be sure to point out this thread if other customers experience similar issues. Thanks again! :D

Get in touch with us on Twitter:
We're also on Facebook:

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

Get started for free