mruff
asked on
HTML Table, align image at the top of the cell
Dear Experts,
I want to align an image at the top of a table cell, the following code does not align the image at the top of the table cell:
The image is still vertically centred, but I want to have it at the TOP of the cell
<table width="658" border="0">
<tr>
<td colspan="3"><strong>Projek tmanagemen t</strong> </td>
<td width="18"> </td>
<td colspan="3"><strong>System migration< /strong></ td>
</tr>
<tr>
<td width="64" ><img src="SomeImage_Resolution6 5x67.png" style="vertical-align: top" /></td>
<td width="12"> </td>
<td width="252">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vel<br />
libero mattis nisi ultricies accumsan sed eu urna. Nunc fermentum<br />
luctus iaculis. Sed arcu nunc, egestas eget hendrerit quis, placerat a<br />
metus. Donec euismod ullamcorper turpis in laoreet.</td>
<td> </td>
<td width="64"><img src="SomeImage_Resolution6 5x67.png" style="vertical-align: top" /></td>
<td width="12"> </td>
<td width="252">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vel<br />
libero mattis nisi ultricies accumsan sed eu urna. Nunc fermentum<br />
luctus iaculis. Sed arcu nunc, egestas eget hendrerit quis, placerat a<br />
metus. Donec euismod ullamcorper turpis in laoreet.</td>
</tr>
<tr>
<td colspan="3"> </td>
<td> </td>
<td colspan="3"> </td>
</tr>
</table>
Many thanks for your support
I want to align an image at the top of a table cell, the following code does not align the image at the top of the table cell:
The image is still vertically centred, but I want to have it at the TOP of the cell
<table width="658" border="0">
<tr>
<td colspan="3"><strong>Projek
<td width="18"> </td>
<td colspan="3"><strong>System
</tr>
<tr>
<td width="64" ><img src="SomeImage_Resolution6
<td width="12"> </td>
<td width="252">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vel<br />
libero mattis nisi ultricies accumsan sed eu urna. Nunc fermentum<br />
luctus iaculis. Sed arcu nunc, egestas eget hendrerit quis, placerat a<br />
metus. Donec euismod ullamcorper turpis in laoreet.</td>
<td> </td>
<td width="64"><img src="SomeImage_Resolution6
<td width="12"> </td>
<td width="252">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vel<br />
libero mattis nisi ultricies accumsan sed eu urna. Nunc fermentum<br />
luctus iaculis. Sed arcu nunc, egestas eget hendrerit quis, placerat a<br />
metus. Donec euismod ullamcorper turpis in laoreet.</td>
</tr>
<tr>
<td colspan="3"> </td>
<td> </td>
<td colspan="3"> </td>
</tr>
</table>
Many thanks for your support
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect - thank you!
ASKER
@admin, sorry, just noticed now, that I got answers from two different experts, can you please split the 500 points between pony10us and ravikantninave, thank you
mruff & admin, Don't worry about it. I see that I had a mistake in mine.
Thanks ravikantninave, I didn't read the whole line and left the "style=" part in. My mistake.
Thanks ravikantninave, I didn't read the whole line and left the "style=" part in. My mistake.
Open in new window
Notice the valign="top"
EDIT: If using HTML5 this probably won't work and you should use CSS instead.