I have three divs of 100% height, I want to add a container around them where the height is automatic, so if I added another fourth div, the height of the container would expand. However, when I add height: auto to the container div, the three divs disappear. I also tried min-height: 100% as well but that didn't work. I can't find an answer that quite works for me and helps me understand the situation. Thanks in advance.
html,body {
height: 100%;
margin: 0;
}
html>body .content {
height: auto;
}
.container {
height: auto;
}
.content {
height: 100%;
min-height: 100%;
}
#one {
background-color: pink;
}
#two {
background-color: lightblue;
}
#three {
background-color: lightgreen;
}
<div class="container">
<div class='content' id='one'></div>
<div class='content' id='two'></div>
<div class='content' id='three'></div>
</div>