Style <$Description$> Tag?

I'm having a hard time styling the text in the <$Description$> tag in a template.  I've posted an image HERE so you can see what it's doing in the "define content" panel.

Here's the code I'm using currently:

<span style="margin-top:14px; margin-bottom:0; font-size:1.3em; font-style:italic; line-height: 1.3;"><$description default='Quote Here'$></span>

Does anyone have any ideas what's going wrong?  I managed to get the title tags to work fine, although I've haven't tested the email in any email clients yet.  Does the description tag work different?


Dave Dave, 7 years ago


Instead of wrapping a span tag with inline CSS around the description tag, I'd recommend giving that span a clas, and then defining how all paagraphs within that span should be styled. For example...

<span class="content"><$description$></span>

Then, in your CSS in the head of the document, have something like...

span.content p ( your CSS rules here }

This way, we'll apply that formatting to all paragraphs within the span, and even move that CSS inline when sending your campaign so it looks great across all the major email clients.

earph, 7 years ago

Yes, I previously tried that and just tried again, but it didn't work.  It weird, because everything else on the page is coming through fine, except for the <$description default=''$> tag.

So, it's ok to put CSS in the <head> of the document?  I thought the new Outlook only supported inline styles.

Mathew Mathew, 7 years ago

You can't have a span (inline element) around a <p> (block element) actually.


div.content p {}
<div class="content">

Do note that you have to style p tags inside of the description tag.

Campaign Monitor will automatically make your styles inline before sending, so you can just put them in the head.

Get in touch with us on Twitter:
We're also on Facebook:
earph, 7 years ago

That didn't work either...

div.quote p { margin-top:14px; margin-bottom:0; font-size:1.3em; font-style:italic; line-height: 1.3; color: #fff; }
div.quote-author p { margin-top:8px; margin-bottom:0; font-weight:bold; color:#fff; }

Does CM recognize and move the "html{}" style inline as well?

On a side note, if a client were to leave a section of a template empty, is there some way to write an "if" statement that would remove that whole section since there would be no content in it?

earph, 7 years ago

I ended up recoding the whole template and fixed the <description> tag problem, but it'd still be great to know about the "if" statement possibilities.

Also, when I'm creating a campaign the font size quadruples after I save "repeater" comment.  Have you ever ran into this problem before?

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