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, 7 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, 7 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, 7 years ago

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

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free
1-888-533-8098