Jump to content

I dont want an image to constrain.

Recommended Posts

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

Link to comment
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

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

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.

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, 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.