Forum Moderators: open

Message Too Old, No Replies

Text position in Tables

         

Adam5000

5:50 pm on Mar 23, 2006 (gmt 0)

10+ Year Member



I've created a table and have put text in one of the cells. And the problem is, the text is centered between the top and bottom of the cell. I'd like the text to start at the top of the cell instead of being centered up but I don't know the code for it. Help!

evo81

6:00 pm on Mar 23, 2006 (gmt 0)

10+ Year Member



valign="top"

Matt Probert

6:46 pm on Mar 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<td valign="top">This is some text within the cell</td>

Matt

Robin_reala

7:56 pm on Mar 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is 2006, we can do better than that :) Add this to your CSS file:

td { vertical-align: top; }

Adam5000

9:23 pm on Mar 24, 2006 (gmt 0)

10+ Year Member



Evo, Matt, and Robin. Thank you for your reply. I tried out both the valign="top" code and the td {vertical-align: top} and they both worked great. The text is ligned up at the top of the cell now.

Adam5000

9:27 pm on Mar 24, 2006 (gmt 0)

10+ Year Member



Oops. The word is lined or aligned. Pick your favorite. Smile.