I wanted to render HTML according to #child_2's contents (https://jsfiddle.net/xhtp70e6/)
<div id="parent">
<div id="child">
<div id="child_1"></div>
<div id="child_2">
Content
</div>
</div>
<div id="child2"></div>
</div>
html, body { height: 100%; }
#parent { width: 50px; height: 1px; min-height: 100%; }
#child { width: 50px; height: 1px; min-height: 80%; background-color: blue; }
#child_1 { height: 50%; background-color: black; }
#child_2 { min-height: 50%; background-color: pink; }
#child2 { width: 50px; height: 20%; background-color: orange; }
when the contents's short, a document is rendered fully to page well. (like above example)
but when the contents's long, it doesn't display whole #child_2's contents. (https://jsfiddle.net/mrdkvvbn/) The #child2's contents goes up on the #child_2's contents without going down it.
<div id="parent">
<div id="child">
<div id="child_1"></div>
<div id="child_2">Content<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</div>
</div>
<div id="child2"></div>
</div>
How can I solve it? please help me !