text doesn't vertical align at the top of my table cell

I can't figure out how i get my text to vertical align at the top of my table cell.

If I put a only 1 line of text it shows a to much spaces under de topborder of the cell.
If I put like 4 lines of text, my table cell seems to get bigger in heigth.

Anyway the top of my image and my text doens't line up neatly when I'm using the editor of Campain Monitor.
When i open the html file with a internet browser everything is just fine.

.tekstfeest {
    font-family: verdana, Arial, Helvetica, sans-serif;
    color: #000;
    font-size: 12px;
    padding-left: 5px;
    padding-right: 3px;
    text-align: left;
    vertical-align: top;

<td width="363" height="109" valign="top" align="left">
<table width="362" border="0" cellspacing="0" cellpadding="0">
<td width="110" height="109" class="picturedj"><img src="<$imagesrc link='true' default='images/dj.gif'$>" width="110" height="109" border=0></td>
<td width="253" height="109" valign="top" align="left">
<table width="252" border="0" cellspacing="0" cellpadding="0">
<td class="tekstfeest" width="362" height="89" valign="top"><strong><$description$></strong></td>
<td width="252" height="20" class="prijstijd"><$description$></td>

Thanks in advance!

BThies BThies, 6 years ago

$Description$ tags create a <p></p> around the text, which renders spacing at the top and bottom depending on # of lines, what's surrounding it, etc.  You could try adjusting margin/padding on your <p> tags.

Also, tekstfeest's width should be 252 based on the table width.

Oh, and don't forget to add display:block; to the image (if it's not already in your css).

If that doesn't work, feel free to e-mail over your HTML for a more in-depth look.


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