Reputation: 2135
When I view the following in Chrome 13.0.782.215 Linux, I find that the div is 5px too high. Looking in the inspector, it seems that chrome is calculating the height of the contents to be 37px (30 + 5 + 2*1 for the borders). Is the 5px a bug? I don't see this problem in Firefox 3.6 or 6.0.
Upvotes: 1
Views: 90
Reputation: 4384
In this case it's not extra padding, it's merely the textarea position with inline text. Set it vertical-align to something like text-top, or middle and you will see the extra 5px disappear.
textarea
{
height:30px;
vertical-align: text-top;
}
It all depends on whatever else you add to the div and how you want it to look.
Upvotes: 1