Jump to content

Resizing photos in the lightbox

Go to solution Solved by sorca_marian,

Recommended Posts

  • Replies 3
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I would remove that custom code. It looks good without it.

You want to decrease the size of only the wider images?

Link to comment
  • Solution

Add the below code in the Page Header Code Injection

</style>
.gallery-lightbox-item-src {
    max-width: 70vw;
}
</style>

70vw represents 70% of the screen width.
The code allows a maximum 70% screen width on the images of the lightbox 

Screenshot 2024-01-16 at 19.46.37.png

Screenshot 2024-01-16 at 19.46.47.png

Edited by sorca_marian
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.