isotope-packery icon indicating copy to clipboard operation
isotope-packery copied to clipboard

center items themselves

Open parliament718 opened this issue 9 years ago • 3 comments

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

parliament718 avatar Apr 26 '15 21:04 parliament718

Nvm, found what I needed.

http://codepen.io/parliament718/pen/bdNgQp

parliament718 avatar Apr 26 '15 22:04 parliament718

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).

parliament718 avatar Apr 26 '15 22:04 parliament718

How do you mean this breaks mobile support? From your example, the items are aligned appropriately on mobile.

desandro avatar Apr 27 '15 12:04 desandro