Reputation: 965
I need to vertical-align:top
both 'Some text' and 'Other text'. The following is not working for me, only the second cell is aligned correctly. I don't understand what the problem is.
<style>
td {
vertical-align:top;
}
</style>
<table>
<tr>
<td><img src="icon.png"/> Some text </td>
<td> Other text </td>
</tr>
</table>
Upvotes: 8
Views: 20367
Reputation: 8704
Rather than using:
td {
vertical-align: top;
}
Use:
td {
vertical-align: baseline;
}
td img {
vertical-align: top;
}
Upvotes: 16