Jump to content

Vertically Center Image from Blog

Recommended Posts

Hello! I'm facing an issue with vertically aligning the images on my blog post to the middle. Turns out I heavily custom coded these pages and I set the images to a max-height of 40vmax. The image is logically cut-off but the problem is that it focuses on the top and not the center of the image. I've already tried with the following:
"
.entry .sqs-block-image-figure .image-block-wrapper img{

    object-fit: cover;
    object-position: center center; 

}

"
and variations, trying different classes, focusing on different nested divs but couldn't find a solution. If someone know what selector to target in order to make this work, it'll be hugely appreciated.

Link to the blogs page: https://www.theslatestudio.com/slate-takes

 

Firefox_Screenshot_2024-03-16T05-25-32.520Z.png

Link to comment
  • Replies 2
  • Views 1.2k
  • 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.