May 19 2015

css div 100% height

Tagged Under :

A lot of people are trying to set div to 100% inside the CSS to fill up the full height of browser window. But normally it wouldn’t work.

In here, I will showing you how to set 100% full height div with CSS. Inside the CSS class remember set html and body element to height 100%.
html, body {
  height: 100%;
After that, set the div CSS class to height 100% which you want it full height.
div.content {
  height: 100%;
And the HTML code will look like this
    <div class="content">
      100% full height

Click here to see the DEMO.

Make a Comment