mattdoherty91 Posted April 22, 2022 Posted April 22, 2022 Site URL: https://cobalt-cinnamon-7xg8.squarespace.com Hello, I've recently customised my slideshow reel gallery block on my home page using the following styles: <style> .gallery-reel { height: clamp(75px, 25vw, 200px) !important; padding: 50px 50px !important; } </style> However, I've noticed that on mobile view, this actually hides the gallery altogether! When I remove the code, it all works and looks fine, but obviously the formatting is then wrong on the home page. So... Is there a way to either make the above code active only on the desktop view, or (inversely) to make the code disabled on mobile view? I was wondering if the @media-something might be useful? Any recommendations would be hugely appreciated. Thank you!
Solution mattdoherty91 Posted April 22, 2022 Author Solution Posted April 22, 2022 Literally moments after submitting this question, I received the answer via a friend: Wrapping the CSS rule in a "Media Query" would only apply when a screen is larger than 767px (standard breakpoint between mobile and desktop), it would look like this: <style> @media(min-width:767px) { .gallery-reel { height: clamp(75px, 25vw, 200px) !important; padding: 17px 0px !important; } } </style> I can confirm that this worked perfectly! Shout out to support@will-myers.com 🙌
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment