Bootstrap 3 Full-Height Columns: A Custom CSS Solution
Introduction:
Creating full-height layouts with Twitter Bootstrap 3 can be challenging. While Bootstrap's native classes do not support this feature, it is possible to achieve this effect using custom CSS.
Custom CSS Approach:
Markup:
<header>Header</header> <div class="container"> <div class="row"> <div class="col-md-3 no-float">Navigation</div> <div class="col-md-9 no-float">Content</div> </div> </div>
CSS:
html, body, .container { height: 100%; } .container { display: table; width: 100%; margin-top: -50px; padding: 50px 0 0 0; } .row { height: 100%; display: table-row; } .row .no-float { display: table-cell; float: none; }
Advantages and Considerations:
The above is the detailed content of How to Create Full-Height Columns in Bootstrap 3 using Custom CSS?. For more information, please follow other related articles on the PHP Chinese website!