The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Masonry gaps appearing when enlarging browser window

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #246785

    Hi, I’m working on a masonry grid. It has 5 columns and goes down to 3 when reducing the browser window. In Chrome it gracefully converts to the 3 columns when reducing the window size but when you enlarge it again large gaps appear when going back to 5 columns. Why is this and is there a way to improve the experience?

    Here’s my codepen:

    Thank you for any help.


    My guess would be that the widths for the elements aren’t whole numbers and it is just a result of how chrome renders fractional pixel values. I don’t really have any advise on how to fix it though…

    This post on Masonry’s github repository seems related:

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.