chodo baggins chodo baggins - 1 year ago 67
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.

<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>

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 Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download