TOC Repeater links - No underline?

Hi,

I'm building my own email template rather than using a pre-built one of your own and am having some trouble styling <a> tags. I'm using the TOC tag and want to remove underline and blue font color from my links but my inline style is getting overridden. I've tried:

text-decoration:none

on:

<tableofcontents>
          <tocitem>
             </repeatertitle style="text-decoration:none !important;">
          </tocitem> 
 </tableofcontents>

tag itself as well as on the table/td but nothing i do seems to work? Can anyone offer any suggestions?

Thanks

BThies BThies, 4 years ago
<head>
<style type="text/css">
    .toc-title a { text-decoration:none; }
</style>
</head>

<body>
<tableofcontents>
    <div align="left" class="toc-title"></repeatertitle></div>
</tableofcontents>
</body>

Brian Thies
Professional Email Developer
Thies Publishing
DuaneGibbs, 4 years ago

Sorry, I should have mentioned that I can't use style tags in the head as I believe Gmail strips these out

BThies BThies, 4 years ago

Campaign Monitor automatically moves the styles inline.


Brian Thies
Professional Email Developer
Thies Publishing
DuaneGibbs, 4 years ago

Ahh brilliant, didn't realise it did that. Had to use

cs-toc-item

selector instead but it fixed it.

Thanks for your help

DuaneGibbs, 4 years ago

Uh oh, maybe i spoke too soon, haha...

In the CM editor/preview, my template shows up without the underline/blue font colour on links just as i want but i've just sent a couple test emails and it's coming through as if the style is being ignored again. This is the code i'm using:

 
<tableofcontents>
   <br />
      <tocitem>
         <span align="left" class="cs-toc-item"></repeatertitle></span><br />
      </tocitem>
    <br />
</tableofcontents>

And the style:

<style type="text/css">
    .cs-toc-item a
    {
        text-decoration:none;
        font-family: Times New Roman;
        color: #5C5C5C;
        font-size:13px;
    }
    </style>
BThies BThies, 4 years ago

It's best not to use CSS classes that are specifically designated for CM's interface that may get stripped out upon send.  Also, the <tocitem> tags are not necessary.

Try this:

<head>
<style type="text/css">
    .toc-title { font-family: Times New Roman, Times, serif; color: #5C5C5C; font-size:13px; line-height:16px; margin-top:0px; margin-bottom:16px; }
        .toc-title a { color:#5c5c5c; text-decoration:none; }
</style>
</head>

<body>
<tableofcontents>
    <p align="left" class="toc-title"></repeatertitle></p>
</tableofcontents>
</body>

Brian Thies
Professional Email Developer
Thies Publishing
DuaneGibbs, 4 years ago

That did the trick, thanks!

So it wasn't working because i was using the cs-toc-item class which CM uses?

Also, i had to use <tocitem> tags or else this error is thrown when i come to upload the file

We found your <tableofcontents> and </tableofcontents> tags, but couldn’t track down the <tocitem> tag.
BThies BThies, 4 years ago

Does your template use older CM tags anywhere else by chance?  That might be why it's requiring those tags.


Brian Thies
Professional Email Developer
Thies Publishing

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