Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why my div box cannot be lower than 21px? 1

Status
Not open for further replies.

davikokar

Technical User
May 13, 2004
523
IT
Hallo,
can div box be a hight lower than 21px. It seems not in my browser (Explorer 6).

div.menu_dot {height:5px;
width: 23px;
margin-top:3px;
margin-left:2px;
float:left;}

any idea?

thanks
 
Nah, it won't collapse to 0px height if it's empty. The way he's defined his div, it will always be 5px + 3px + 2px in height, for a total of 10px.

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
In some cases (IE, width/float speficied) DIV inherits font size from parent element(s) even if there is nothing inside. Try with overflow-y: hidden; or font-size: somesmallvaluepx;.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top