Jump to content

I dont want an image to constrain.

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

37 minutes ago, decoratedwolves said:

Site URL: https://www.decoratedwolves.com/cult-heroes

Hey,

Just wondering if someone can help with an image constraint/aspect ratio issue I'm having?
 

I have 3 images, all the same height, but one with larger width.
Is there a way to get rid of the constraint so they all remain the same height when viewing on desktop?

The page in question > https://www.decoratedwolves.com/cult-heroes

 

Thanks

Steve

You can try this, it work if you has 3 image

#collection-6012a3785d5a920aaf04796b .slide.sqs-gallery-design-autocolumns-slide {
  height: 100% !important;
  overflow: hidden;
}
#collection-6012a3785d5a920aaf04796b .sqs-gallery-design-autocolumns-slide img {
    width: auto;
    height: 100%;
    display: inline-block;
    transition: opacity .2s;
    opacity: 1;
    left: 50%;
    transform: translateX(-50%);
    position: relative;
}

image.thumb.png.b7764be7bf9e1dbb32525099ccfa3a0f.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Just tried the code, and although it makes the second image the correct height, it now hides the sides of the image.
Is there a way for both height and width to be 100%?

Steve

Link to comment
18 minutes ago, decoratedwolves said:

Just tried the code, and although it makes the second image the correct height, it now hides the sides of the image.
Is there a way for both height and width to be 100%?

Steve

that because gallery grid coming with a masory grid, it will equalize the width of images.

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
  • 1 year later...

Is there a way to use this code (or something similar) to achieve the same effect with a group of images in a section block (not a gallery)?  I have a few differently proportioned images lined up next to each other and would like for them to conform to the same height while maintaining their respective aspect ratios.

Link to comment

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.