Reputation: 1675
I am a bit confused. Should I use top or text-top? I found reference to both but I'm not sure which to use. All I have is a simple table with two rows and two columns. I would like the text to be aligned to the top and to the left in each cell. What's the most easy way for me to do this? Can I do it without lots of CSS and use inheritance?
Upvotes: 3
Views: 119
Reputation: 92803
@TonyG; Check jsfiddle may be that's you want.
there are different selectors for this type of functionality like :first-child
, :last-child
& nth-child()
.
td:nth-child(1){
vertical-align: top;
}
Upvotes: 1
Reputation: 54052
try
table td { vertical-align:top; float:left }
Reference:
Upvotes: 1
Reputation: 1534
In your css file configure the td style and add vertical-align: top;
This will align all the data in between and on the top of the table and aligned left
Upvotes: 1
Reputation: 18252
All you should need to do is add vertical-align: top;
to your td
styles.
Here's a very simple example: http://jsbin.com/usego3/2
Upvotes: 0