isotope-packery
isotope-packery copied to clipboard
center items themselves
I'm using packery to display search results as fixed width items. My search bar is centered and I would like the results to be centered also, even if there is not enough items to fill the width:
Here's an example I found of some kind of centering override, however it doesn't exactly do what I want.
http://codepen.io/parliament718/pen/xGbgJz
As you see, when there are just 3 results, they are left aligned and it looks bad because the search bar is centered.
Is there any way to center the items within the container?
I found this unanswered SO that shows visually what I'm looking for.
http://stackoverflow.com/q/18603801/1267778
Nvm, found what I needed.
http://codepen.io/parliament718/pen/bdNgQp
Ah re-opening because that pen actually breaks mobile support:
Is there anyway to keep this feature and still have mobile support (have items dropdown on mobile so there's no horizontal scrollbar).
How do you mean this breaks mobile support? From your example, the items are aligned appropriately on mobile.