miromannino / Justified-Gallery

Javascript library to help creating high quality justified galleries of images. Used by thousands of websites as well as the photography community 500px.
http://miromannino.github.io/Justified-Gallery/
MIT License
1.7k stars 299 forks source link

Design related question regarding extra spacing around justifiedgallery of images #220

Closed deronsizemore closed 7 years ago

deronsizemore commented 7 years ago

image

I'm curious if there's a way to make the justified gallery of images truely 100% width? I seem to be getting some margin/padding or something around the container of images but I can't seem to figure how to alter it so that the gallery is 100% width where it matches up with the content that's above and below it? Is this possible?

biziclop commented 7 years ago

Hi, see the margins and border options: http://miromannino.github.io/Justified-Gallery/options-and-events/ Especially look at border's description: border -1 Decide the border size of the gallery. With a negative value the border will be the same as the margins. If nothing works, you can always use some negative margins with the gallery container.

deronsizemore commented 7 years ago

Thanks for that. Unfortunately I don't think that will work in my particular case. currently have margin: 10 set in the justifiedGallery settings. I actually do need the margins to be between the photos which I realize that also adjusts the margin around the outside of the images as well not just the inside. I guess I was just hoping there was an easy way around this to eliminate the margin around the outside and just keep the margins between the images themselves.

deronsizemore commented 7 years ago

Actually I think (haven't tested it thoroughly) I can use negative margin left with position relative to eliminate the margin on the left side of the container and then expand the width to 102% to get it to appear the same width as the container