Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 822 Bytes

File metadata and controls

27 lines (20 loc) · 822 Bytes

bootstrap-grid-float-fix

Simple fix for floated grid elements of varying sizes (using inline-block)

Changes the grid elements to inline-block which allows us to alleviate the annoying float issues when elements flow over to a new row.



CSS Usage:
Simply add the CSS to your page's main CSS file (or add the CSS file iself as a link).

SASS Usage:
Add @import "col-fix"; to your bootstrap.scss file

HTML Setup:
Add the class col-fix to all elements within the row that needs fixed
example:

<div class="row">
  <div class="col-sm-12 col-md-6 col-lg-4 col-fix">...</div>
  <div class="col-sm-12 col-md-6 col-lg-4 col-fix">...</div>
  <div class="col-sm-12 col-md-6 col-lg-4 col-fix">...</div>
  ...
</div>