Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS column grid issue with sorting

Tags:

css

Inspired by this tutorial, I've set up a Fiddle that has 5 columns. That works fine with 5 images. With 6, however, it sorts it into 2 rows of 3 instead of one row of 5 and a row of 1. Other configurations have a similar effect.

Is there a reason for this and a way to prevent that from happening?

like image 692
Andy Avatar asked Aug 05 '26 20:08

Andy


1 Answers

You should use as an additional style, like this:

   float:left;
like image 131
cube Avatar answered Aug 08 '26 12:08

cube



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!