Reputation: 5798
I have a table with two columns. The left side us usually 1 word, and the second one with a bit more text. When I have too much text on the second column, the first one expands and center the text.
How do I remove this unwanted padding so the text will be on the top-left?
Upvotes: 3
Views: 2251
Reputation: 3220
Just Select your Class via .tlt
and add vertical-align:top
you don't need to do anything more since for your .tlt
just padding-right
has been added so that there will be a space between two columns.
CSS
.tlt{
vertical-align:top;
}
Add it at the end of your Css Code.
Upvotes: 0
Reputation: 739
Inside a table-row, the two cells have always the same height. It shows as a padding, but it's automatically applied.
As some users mentioned, you can set a vertical-align: top;
for the cell, and than play with padding top to position the text.
Upvotes: 1
Reputation: 1071
in ALL browsers, the browser will make padding and margin between all the things. to remove that and control the page yourself add this add the first line of your css:
* {margin:0 auto; padding:0}
auto
makes all the things (except text and images) at the center of your page.
and for your table if you want texts to be on top of your td, add this:
.tlt{vartical-align:top; text-align:left;}
Upvotes: 0