Reputation: 925
I have a div container in my html page and i want set its height to expand all remaining page in the screen..
How can i do that ??
That's my code :
HTML
<div class="row">
<div id="builder-container" class="col-xs-12 col-lg-9">
<div id="builder-content" > </div>
</div>
</div>
CSS
#builder-container {
background-color: #ccc;
height: 100%;
}
Upvotes: 4
Views: 13738
Reputation: 1
<div class="row full_height">
<h1>Test elem</h1>
</div>
.full_height {
height: 100vh
}
Upvotes: 0
Reputation: 5810
Actually it would not get cover your whole page without enough content, but the best way is to give it 'position:absolute/fixed/relative' and give the same div top:whateveryouwant px; and bottom: 0px/0%; width and height :100%
JSFiddle - Edited: Check it now
CSS
body
{
margin:0;
width:100%;
height:100%;
}
#builder-container {
display:block;
position:absolute;
margin-top:5%;
left:0%;
bottom:0%;
background-color: #ccc;
height: 100%;
width:100%;
}
Upvotes: 0
Reputation: 1618
You have to give all of the parent elements, including the div you want to extend, a height of 100%.
Upvotes: 4