Rafida Posted September 14, 2020 Posted September 14, 2020 Site URL: https://www.rafida.org Hey, I'm trying to limit the maximum size of an image on mobile. This code used to work for image blocks, but not working for gallery blocks. The reason I switched to a single image gallery rather than an image block is for the video lightbox function. The image I'm trying to restrict is the large orange play button at the top of the home page. Any idea why it's not working?website: rafida.orgpass: lastphasetesting3 - Code provided below. - Screenshot provided of single image gallery I'm trying to restrict on mobile @media screen and (max-width:640px) { div#block-yui_3_17_2_1_1600057330272_455 img { width: 50% !important; height: auto !important; transform: translateX(-50%); left: 50% !important; top: 0 !important; } div#block-yui_3_17_2_1_1600057330272_455 .image-block-wrapper { padding-bottom: 50% !important; } }
tuanphan Posted September 14, 2020 Posted September 14, 2020 Add to Home > design > Custom CSS /* Play icon mobile */ @media screen and (max-width:640px) { div#block-yui_3_17_2_1_1600056103323_14741 { width: 50%; margin: 0 auto; } } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.