The following situation arose, wrapped the site content in a wrapper
, in order to press the footer
to the bottom of the page. After that, the height of the Bootstrap of the content
block is not set as a percentage. To be more precise, the expected result is displayed in Opera, but in other browsers does not work.
Here is the approximate code of the page (without content):
<html><head> <title><?php echo $title;?></title> </head> <body> <div class="page-wrapper"> <div class="container"> <div class="row"> <div class="col-md-12">Контент</div> </div> <!-- End row --> </div> <!-- End container --> <div class="page-buffer"></div><!-- End buffer --> </div><!-- End wrapper --> <div class="page-footer"> <div class="text-align-center">Футер</div> </div><!-- End footer --> </body></html>
CSS styles for wrapper
:
.page-wrapper { min-height: 100%; margin-bottom: -50px; } * html .page-wrapper { height: 100%; } .page-buffer { height: 50px; clear: both; } .page-footer { height: 50px; }
It would be desirable, that container
occupied at least 90% of height of the page.