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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

child div height = parent div height ?

Status
Not open for further replies.

papageno

Technical User
Dec 25, 2004
24
0
0
ES
I can't seem to find a way to make a floated div the same height as its parent non-floated div, i.e.:

Code:
.parent {
  border: 1p solid #ffffff;
}
.child {
  float: left;
  width: 10px;
  height: 100%;
}

If I specify a height for the .parent div (e.g. 100px), then the .child is no taller than that (100px) when the content of the .parent occupies more than the specified height. (In IE6 at least.)
 
You kinda say it in a way that makes it seem like that is not the best thing you could possibly do with your life...

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
I just want the floated div to expand vertically to the parent's size. It seems I need to explicitly set the parent's height for ".child height:100%" to work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top