Link to home
Start Free TrialLog in
Avatar of MinnRick
MinnRickFlag for United States of America

asked on

Whitespace Above Text In a DIV With No Padding

Hello Experts -
A quick 500 points for someone..  Using the following DIV and assuming no further CSS specified elsewhere, why is there whitespace between the top of the text and the top border?
<div style="border:1px solid black; height:30px; width:100px; padding:0; vertical-align:top;">Fubar</div>

Open in new window

The left edge of the text sits immediately next to the left border (as expected) but the top doesn't do the same.  Why, and how do I get rid of that whitespace?  Thanks.

-- Rick
ASKER CERTIFIED SOLUTION
Avatar of Kim Walker
Kim Walker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MinnRick

ASKER

That must've been it.  Adjusting the line-height worked fine.  Thanks XM.