Inline Styling Table of Contents for Template

I can't seem to use inline styling for the <tableofcontents> area when building a template.
I'm trying to create a template which uses a toc in the header like Campaign Monitor's email.
Here's what I have so far:

<table cellspacing="0" border="0" cellpadding="0" width="0">
       <ul style="font-size: 12px; font-weight: normal; margin: 0px; font-family: Helvetica, Arial, sans-serif; list-style: none; color: #ffffff; text-decoration: none; padding: 0px;">
              <tableofcontents>
                     <li style="font-size: 12px; font-weight: normal; margin: 0px; font-family: Helvetica, Arial, sans-serif; list-style: none; color: #ffffff; text-decoration: none; padding: 0px;">
                    <$repeatertitle$>
                    <img src="img/spacer-header.png" height="1" style="margin: 0px; padding: 4px 0 4px 0; display: block;" width="440" />
            </li>
         </tableofcontents>
    </ul>
</table>

petertressler, 6 years ago

Specifically, what I'm trying to do is to remove the default blue link color and also the underline.

I've tried, style="color: #ffffff; text-decoration: none;" but it's not working.

BThies BThies, 6 years ago

Assign a class to the table with the <$repeatertitle$>.  Then assign the style to the class:

<style type="text/css">
.whitelink a { color:#FFFFFF; text-decoration:none; }
</style>

<table>
  <tr>
     <td class="whitelink">
        <$repeatertitle$>
      </td>
   </tr>
</table>

Example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.whitelink a { color:#FFFFFF; text-decoration:none; }
</style>
</head>

<body>
<table cellspacing="0" border="0" cellpadding="0" width="0">
    <tr>
        <td class="whitelink" bgcolor="#000000">
              <ul style="font-size: 12px; font-weight: normal; margin: 0px; font-family: Helvetica, Arial, sans-serif; list-style: none; color: #ffffff; text-decoration: none; padding: 0px;">
                <tableofcontents>
                    <li style="font-size: 12px; font-weight: normal; margin: 0px; font-family: Helvetica, Arial, sans-serif; list-style: none; color: #ffffff; text-decoration: none; padding: 0px;"><$repeatertitle$></li>
                 </tableofcontents>
            </ul>
        </td>
    </tr>
</table>
<repeater>
<div style="font-size:14px; color:#000066; font-family:Helvetica, Arial, sans-serif"><$title$></div>
</repeater>
<unsubscribe>Unsubscribe</unsubscribe>
</body>
</html>

Brian Thies
Professional Email Developer
Thies Publishing
petertressler, 6 years ago

Perfect. Thank you!
I also added inline styling to the same table where the class is assigned.

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