Reputation: 21406
I have a table like this;
HTML
<table>
<tr>
<td>mytext</td>
</tr>
</table>
CSS
table tr td{
height: 100px;
width: 200px;
border: solid 1px #000;
}
which look like this;
But I want the text to start at the beginning of the box, like;
How can I achieve this? Here is the working fiddle.
Upvotes: 0
Views: 134
Reputation: 2509
Use below code in your css.
table tr td{vertical-align: top;}
Upvotes: 0
Reputation: 3591
Just use vertical-align: top
Update fiddle here here
Upvotes: 0
Reputation:
Here's the answer:
table tr td{
height: 100px;
width: 200px;
border: solid 1px #000;
vertical-align: top;
}
Upvotes: 3