Skip to content

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

Notifications You must be signed in to change notification settings

jimulle/bootstrap-grid-float-fix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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>

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages