MartinMurray Posted October 25, 2022 Posted October 25, 2022 (edited) Hi All I'd like to make a code block smaller when in Narrow view (Mobile) by about 60-50%... I've tried a few code snips like the below, with no luck! The code block is holding a scroll Lottie file I made. Any help would be great. /* Mobile resize code block */ @media screen and (max-width:767px) { div#block-62452260eb439022d3cd { width: 50%; margin: 0 auto; } } The page is live and open - https://intropic-info.io/pfi Edited October 25, 2022 by MartinMurray Your Martin
adifederico Posted October 25, 2022 Posted October 25, 2022 Give this a try. It will bring the image to 50% on any device smaller than 640px. If you wish you can change the 640 to the 767 you have but Squarespace for this page looks like its breaking for mobile at 640px. This is only for the lotti custom code image your using. @media screen and (max-width: 640px) div#block-62452260eb439022d3cd { width: 50%; }
Solution MartinMurray Posted October 26, 2022 Author Solution Posted October 26, 2022 Thanks, I was just overthinking it a little, Your snip was missing '}}'... This works great. /* Mobile resize code block */ @media screen and (max-width:767px) { div#block-62452260eb439022d3cd { width: 50%; } } Thanks adifederico 1 Your Martin
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment