How to align the contents of table cells on top?

I have an HTML table. Each cell has a different length.

For this reason, the content does not align on top.

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

Instead, the contents are centered in the middle.

How can I fix this (cross browser solution working in IE)

thanks

+4
source share
2 answers

in css

td, th { vertical-align:top; } 
+11
source

use valign = "top" on td

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

setting the attribute to tr should work for the entire row, such as wise for the table

+3
source

All Articles