html - How can I make my content 100% height? -
just simple structure. trying make content wrapper have left , right borders , stretch 100% height. seems simple not working. missing something?
<?php get_header(); ?> <div class="content_wrapper clearfix"> </div> <?php get_footer(); ?>
//header
<body <?php body_class(); ?>> <div class="header clearfix"> <div class="header_wrapper clearfix"> <div class="logo_wrapper"> <div class="logo"> </div> </div> </div> </div>
//footer
<?php wp_footer(); ?> </body> </html>
//css
body { width:100%; height:100%; line-height: 1; font-family: "helveticaneue-light", "helvetica neue light", "helvetica neue", helvetica, arial, "lucida grande", sans-serif; font-weight:300; } .content_wrapper { width:960px; height:100%; margin:0px auto 0px auto; border-left:1px #ccc solid; border-right:1px #ccc solid; } .header { width:100%; height:80px; background:#fff; border-bottom:1px #ccc solid; } .header_wrapper { width:960px; margin:0px auto 0px auto; height:80px; border-left:1px #ccc solid; border-right:1px #ccc solid; } .logo_wrapper { width:187px; height:63px; padding-top:8px; } .logo { width:187px; height:63px; background:url(../images/bit_ball_ai.png) no-repeat; margin-left:20px; }
thanks
here's surefire way of making 100% height:
#element { position: absolute; top: 0; bottom: 0; }
that make fill available space, if needs relative or statically positioned, you'd you're doing:
#element { min-height: 100%; }
if isn't working, it's because 1 of parent elements isn't 100% height. looking @ html seems parent elements html , body, define 100% height on body, still constrained html. next step make sure html , body elements both have 100% height:
html, body { height: 100%; } html > body > #element { height: 100%; /* more styles */ }
Comments
Post a Comment