Jump to content

SqSp 7.1FE I'd like CSS control over the size of the Lightbox image on desktop and smartphone

Go to solution Solved by TaitDesign,

Recommended Posts

My gallery lightbox images are opening too large on desktop view.

1. I'd like to have control over the image size and limit the size to about 35%-50% in desktop view, and… 

2. Keep the size as is (100%) on smartphone view. www.taitdesign.com*

I've explored CSS such as this for the desktop, but it's not working:

/* Lightbox max size */
.gallery-lightbox-item img {
  width: 50% !important;
  height: auto !important;
}

Can you guide me in the right direction? Thanks!

*At the time of this post I'm having DNS issues and the taitdesign.com site may not show up on your desktop but should on your smartphone. It does on mine. It's confusing. I will address this issue after coffee. About 16 hours ago I swapped my old 7.0 site for a new 7.1 FE site. The site worked for about two hours. Any help would this issue would also be appreciated. Just tell me where to look. I've talked to my domain provider and that was useless.

Link to comment
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

37 minutes ago, TaitDesign said:

My gallery lightbox images are opening too large on desktop view.

1. I'd like to have control over the image size and limit the size to about 35%-50% in desktop view, and… 

2. Keep the size as is (100%) on smartphone view. www.taitdesign.com*

I've explored CSS such as this for the desktop, but it's not working:

/* Lightbox max size */
.gallery-lightbox-item img {
  width: 50% !important;
  height: auto !important;
}

Can you guide me in the right direction? Thanks!

*At the time of this post I'm having DNS issues and the taitdesign.com site may not show up on your desktop but should on your smartphone. It does on mine. It's confusing. I will address this issue after coffee. About 16 hours ago I swapped my old 7.0 site for a new 7.1 FE site. The site worked for about two hours. Any help would this issue would also be appreciated. Just tell me where to look. I've talked to my domain provider and that was useless.

You can try this in custom css



@media only screen and (min-width: 768px) {
  .sqs-lightbox-slide img.thumb-image.loaded {
    width: 50% !important;
    height: auto !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%);
}
  .sqs-lightbox-slide .sqs-lightbox-meta {
        padding: 0 25%;
  }
}

The image caption's position is generated programmatically so I let it stays where it is now with slightly change on the padding to fit the cropped image dimension

image.thumb.png.b349e40b53cf8f7f7f25ed8f5bd87867.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

Thank you. That works perfectly. (My code wasn't even close.) 

Now I have to reduce the space between the image and the Title text, and I'd like the title to 'show' on the smartphone. (I can likely handle that.)

One question: Are you able to see my site on your desktop? My next task is to readdress the "DNS_PROBE_FINISHED_NXDOMAIN" error that I and others are getting in all browsers, PC and Mac, on desktop.

Link to comment
2 minutes ago, TaitDesign said:

Thank you. That works perfectly. (My code wasn't even close.) 

Now I have to reduce the space between the image and the Title text, and I'd like the title to 'show' on the smartphone. (I can likely handle that.)

One question: Are you able to see my site on your desktop? My next task is to readdress the "DNS_PROBE_FINISHED_NXDOMAIN" error that I and others are getting in all browsers, PC and Mac, on desktop.

I can see your site on desktop, the screenshot is taken on Chrome desktop on my Macboom

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

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.