Link to home
Start Free TrialLog in
Avatar of mruff
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>Projektmanagement</strong></td>
    <td width="18">&nbsp;</td>
    <td colspan="3"><strong>Systemmigration</strong></td>
  </tr>
  <tr>
    <td width="64" ><img src="SomeImage_Resolution65x67.png" style="vertical-align: top" /></td>
    <td width="12">&nbsp;</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>&nbsp;</td>
    <td width="64"><img src="SomeImage_Resolution65x67.png" style="vertical-align: top" /></td>
    <td width="12">&nbsp;</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">&nbsp;</td>
    <td>&nbsp;</td>
    <td colspan="3">&nbsp;</td>
  </tr>
</table>


Many thanks for your support
Avatar of Steven Carnahan
Steven Carnahan
Flag of United States of America image

Have you tried:

<td width="64" valign="top" ><img src="SomeImage_Resolution65x67.png" style="vertical-align: top" /></td>

Open in new window


Notice the valign="top"

EDIT:  If using HTML5 this probably won't work and you should use CSS instead.
ASKER CERTIFIED SOLUTION
Avatar of ravikantninave
ravikantninave
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mruff
mruff

ASKER

Perfect - thank you!
Avatar of mruff

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.