Jump to content

Make section height responsive to content for filterable gallery?

Recommended Posts

Posted (edited)

I am using a custom code block to create a filterable gallery of a bunch of images. By default, it displays all +20 images, but when I click one of the categories to filter the images (e.g., by kitchen, by living room, etc.) it cuts down to just a handful, the section height looks to remain the same. This creates a ton of white space in the middle of the site. How might I get this section to respond to the height of the content being presented based on the filtered view? 

Here's a before click: 
image.thumb.png.b78db60a13ac21f56d75aefa222b04ca.png
Here's after

image.thumb.png.37c619c1446a1c567bad7b7bac0232b7.png

I've been using openai to help write the code, but I'm stuck on this. Any ideas? 

Edited by napalmjs
uploaded incorrect image
  • Replies 1
  • Views 465
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.