Skip to content

Single image fills container #67

Answered by igordanchenko
playaz87 asked this question in Q&A
Discussion options

You must be logged in to vote

Update (Dec 2022): the below answer is relevant to v1 of the library. v2 implements the desired behavior by default.


Hi there!

Thank you for the great question! You haven't missed any setting here, as this is the intended library behavior. The library intentionally opts to render fewer columns when there aren't enough photos to fill all the columns. There are multiple approaches to tackle this issue, and I'm leaving this decision to the library users.

Here are some approaches you can consider (all of them provide slightly different UX and have their tradeoffs):

  1. Limit parent container width. The gallery utilizes 100% of its parent's horizontal space, so you can wrap it in a div and limi…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@JaosnHsieh
Comment options

Answer selected by playaz87
Comment options

You must be logged in to vote
3 replies
@igordanchenko
Comment options

@dro-sh
Comment options

@igordanchenko
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants