After every 3rd div, you can add this line to fix the height problem:
<div class="clearfix hidden-xs"></div>
Explanation:
The problem was having divs with different heights. Since all floating col-* classes in the bootstrap are floating, some clearfixing is required in such cases to eliminate misalignment. In this particular case, clearfix should not be applied to additional small screens, because in this case there should be 6 columns instead of 3 columns instead of a column, so I used the hidden-xs class.
source share