Skip Navigation

[Resolved] Gallery Block adding large space above block in mobile view

This support ticket is created 2 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 6 replies, has 2 voices.

Last updated by conradA 2 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#2455691

The lightboxed gallery images display with a reasonable amount of padding/margin when viewed on desktop and even Chrome's mobile view emulator, but on an actual mobile device, a large amount of space is added to the top of the gallery. I don't know where the space is being added, and haven't been able to reproduce it on a desktop to be able to fix it.

example page: hidden link

#2456051
mobile-screenshot.png

Hi,

Thank you for contacting us and I'd be happy to assist.

I've tested your website's gallery lightbox on my Samsung mobile and it showed correctly.
( example screenshot attached )

Are you experiencing this issue on a particular device or browser? If yes, can you share the details of the device and browser, along with the screenshot of how it looks?

I'll be in a better position to investigate this accordingly.

regards,
Waqar

#2456061
2CE1C664-1AAA-4A81-83F5-5BAE23802884.png

The issue isn’t with the light box function, but with the space added above the row of images in the gallery block. Adding a screenshot from chrome on iphone

#2457021

Thanks for writing back and for sharing that screenshot.

I was able to see the issue on an iPhone too. During troubleshooting, I noticed that following CSS code from the active theme's "style.css" file ( /wp-content/themes/twentytwenty/style.css ) is causing this extra space:
( you'll find two instances of this code in that file )


.tb-gallery--grid--nocrop .tb-gallery__cell {
    	align-self: baseline !important;
}

If you'll remove this CSS code, the spacing will be fixed.

#2457369

I've removed both instances of that code from the css, but am still observing the issue across devices.

#2458257

This seems to be a cache-related issue.

If you'll open that CSS file in the browser, with the following URL ( which the website is using), you'll see that the code is still there:
hidden link

However, try changing the same URL by just replacing version number 1.7 with any other number and you'll see that the code will not be available.

This suggests that your CDN (Cloudflare) or your website's cache plugin is still serving the older cached version of that CSS file. Please clear all involved caches, including the one in the mobile's browser and then check the page again.

#2458273

My issue is resolved now. Thank you!