chodo baggins chodo baggins - 1 month ago 9
HTML Question

How do I vertically align text within a td and a span?

Here is what I have, the only CSS is styling for my tags, so there is no relevant CSS effecting this.

<tr>
<td colspan="2" valign="top"><span style="font-size:20px; color:#ed8f49">Fall Classes with</span><img src="REDACTED.png" height="90" width="482"></td>
</tr>


When I have only the TD things work fine, but as soon as I put that text in a span or try to make it h1 it aligns to the bottom, even if I add alignment attributes to the span as well.

And before one of the thousands of people who roam the internet doing nothing but waiting to jump out and say "DURRRR TABLES FOR LAYOUT DURRRR USE CSS" it is an email newsletter, so keep it to yourself.

Answer

You need align="top" or style="vertical-align:top on your image :)