tags:

views:

27

answers:

2

I have a HTML table. Each cell has content of different length.

For this reason, the content is not aligned on the top.

I would like the first lines be aligned also in cells with few lines of text (the content should always start from the top).

Instead the content is vertically centered in the middle.

How can I fix this (a cross-browser solution.. working in I.E. as well)

Thanks

A: 

use valign="top" on the td

<td valign="top">....</td>

setting the attribute on the tr should work for the entire row like wise for table

Vinay B R
+2  A: 

in css

td, th {
vertical-align:top;
}
Tim
thanks, is vertical-align working in IE 7 and 8 as well ?
Patrick
@Patrick: Yes. But you could just check that of course ;)
Joeri Hendrickx
I explain you why :) The website is offline, I don't have the hosting ready and my localhost is on mac. Thanks!
Patrick