Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a Pinterest-like grid with Bootstrap: the boxes are not displayed right below each other

The HTML scheme is following:

<div class="items">
  <div class="item">...</div>
  <div class="item">...</div>
  <div class="item">...</div>
  ...
</div>

.item CSS style:

float: left;

And the result: enter image description here

But the white boxes are not aligned right one after another one -- where could be the issue? I;ve tried also using display: inline-block; instead of float: left;, but the result was basically the same.

Thank you

like image 634
user984621 Avatar asked Mar 03 '14 13:03

user984621


People also ask

Does bootstrap use display grid?

Bootstrap has a responsive grid system, with custom breakpoints. It offers a mobile-first design that makes a single code scale for multiple devices like phones, tablets, and desktops.


1 Answers

You can use CSS 3 column-width and column-gap like this..

http://www.bootply.com/118335

like image 157
Zim Avatar answered Sep 28 '22 04:09

Zim