-3

I'm trying to have two DIVs be 100% height of their containing elements. But it always stays at 200px for some odd reason. The body element and the div #wrapper are set to 100% height, but are only 200px high.

Also, when I set HTML {height: 100%}, using Chrome's element inspector, the actual HTML element is set to 200px.

Mock up website: CodePen https://1cfa12692148c3352bc30134a5ae506804775e77.googledrive.com/host/0B_5GGeR4a3S6ODlydkNFQnZHbWM/index.html

Eduardo06sp
  • 331
  • 1
  • 4
  • 16

2 Answers2

0

Try with making body and wrapper position as absolute and set top and bottom size to 0.

position: absolute;
top: 0;
bottom: 0;
height:100%;

Hope it will do the job.

Shahin Alam
  • 73
  • 14
0

This happens because you have a lot of float elements and position absolute. If you use a class like .clearfix some elements your height could be good. Codepen

.clearfix { 
  display: block;
  clear: both;
}
.clearfix:before,
.clearfix:after {
  content: '';
  display: block;
  clear: both;
}

And I add this class to your #content

<div id="content" class="clearfix"> 
   ...
</div>
<div id="footer" class="clearfix"> 
   ...
</div>
fcastillo
  • 938
  • 1
  • 11
  • 24