CaldwellYSR
Member
I should know this. I'm 99% sure I figured it out at one point and since I've moved on past css I've forgotten it. How do I make a floated div have the height of it's container div? Basically I've got 3 divs that are effecting this problem. I've got a container div, a nav div, and a content div. Here's the CSS.
So the problem is that when I put enough content in the content div to make it taller than the nav div all the content from the content div goes under the nav div. I want the nav div to stretch to the bottom of the container div so the contented div won't go under it.
Code:
#wrapper {
width: 800px;
border: 8px solid white;
border-radius: 15px;
margin: 40px auto 40px auto; //Center and give space top+bottom
background: black;
box-shadow: -10px 10px 10px #2c2c2c; //Shadow from top-right
}
#nav {
float: left;
margin: 15px 15px 15px 0px;
}
#content {
margin: 15px;
height: 100%;
}
So the problem is that when I put enough content in the content div to make it taller than the nav div all the content from the content div goes under the nav div. I want the nav div to stretch to the bottom of the container div so the contented div won't go under it.