Search code examples
htmlcssstylesheet

height:100% css is not working


I have set up a jfiddle example, and it seems like my height:100%; is not working.

body, html 
{
    height:100%;    
}

#full-wrap {
    min-height:100%;
    height: auto !important;
    height:100%;
    margin:0 0 -91px;    /* 1 extra px from footer border */
    clear:both;
    border:thin solid red;
}
.contentCenter {
    min-height:100%;
    height:100%;
    width:300px;
    margin: 0 auto;
    clear:both;
    border:thin solid blue;

}


.footer {
    height:90px;width:100%;
    border-top:1px #E8E8E8 solid;
    clear:both;
}    


<div id='full-wrap'>
    <div class='contentCenter'>
    </div>
</div>
<div class='footer'>
</div>

Can someone help me with the problem? as you can see that the border line (blue) is not going 100%.


Solution

  • height: auto !important;
    

    Remove that line and it works.