Holly_MadeofGray Posted July 21, 2022 Share Posted July 21, 2022 (edited) I'm trying to replace the desktop image with a mobile image on a non-live site that I'm building. I have the desktop image in section 2 and the mobile in section 3. They are set up as gallery blocks, not background images. On the desktop view, the CSS is doing what it is supposed to, but on the Mobile view, both images/sections are still visible. I'm working in classic 7.1 Does anyone have advice? <style> @media only screen and (max-width: 640px) { section[data-section-id="62d9a16c9437e42a72be6475"] { display: none !important; } } @media only screen and (min-width: 641px) { section[data-section-id="62d9a3197940bf165283c52b"] { display: none !important; } </style> Edited July 21, 2022 by HDGray Link to comment
tuanphan Posted July 22, 2022 Share Posted July 22, 2022 Second code missing a } symbol. It should be <style> @media only screen and (max-width: 640px) { section[data-section-id="62d9a16c9437e42a72be6475"] { display: none !important; } } @media only screen and (min-width: 641px) { section[data-section-id="62d9a3197940bf165283c52b"] { display: none !important; } } </style> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Holly_MadeofGray Posted July 22, 2022 Author Share Posted July 22, 2022 6 hours ago, tuanphan said: Second code missing a } symbol. It should be <style> @media only screen and (max-width: 640px) { section[data-section-id="62d9a16c9437e42a72be6475"] { display: none !important; } } @media only screen and (min-width: 641px) { section[data-section-id="62d9a3197940bf165283c52b"] { display: none !important; } } </style> Thank you! Even this isn't working. It's the desktop version that isn't hidden on the mobile version. I've tried it on two different pages and it's still acting the same way. Link to comment
tuanphan Posted July 23, 2022 Share Posted July 23, 2022 16 hours ago, HDGray said: Thank you! Even this isn't working. It's the desktop version that isn't hidden on the mobile version. I've tried it on two different pages and it's still acting the same way. Can you share page url? We can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment