<.RecommendCSS Div stretch 100 page height. ow has been edited because it did not show correctly in FF and Chrome. moved position:relative to be on the HTML and set the body to height:100 instead of min-height:100. We will set the height of container, font on parent element and create :after pseudo selector shown in the example below.
This is a vertical align middle with display:flex div>. Id like to expand the container DIV to the height of the inside DIVS. My content div has dynamic text of a varied length, and the container has a static white background. please could someone point me to the correct CSS code for these elements to achieve this.
If an explicit height is set on the containing div then height:100 on the contained div will mean that it grows to the height of the container.The code excerpt below is an example of the CSS used for a container class (youd find this as in the html file. position:relative .container. height: 100 background: green
The height of this DIV element is equal to the 100 height of its parent elements height.
. You can also use Flexbox to create equal height boxes.col-container display: flex width: 100 .col flex: 1 padding: 16px Try it Yourself ». Note: Flexbox is not supported in Internet Explorer 10 and earlier versions. How can I make container2 to fill available height, so it does not add the scroll to window.div class"navbar navbar-default"> NAVBAR