Jump to content

Why can't I hide images on Mobile only using the CSS I'm adding?

Go to solution Solved by WCS,

Recommended Posts

Posted (edited)

Hello, Can someone please help me, I am trying to hide certain images on the mobile version of my website using the code: 

@media screen and (max-width: 640px) {
#block-yui_3_17_2_1_1689763110049_14549 {
display: none !important;
}
}

But it's not working! My website is karlmackieshop.com 

Grateful for some advice and thanks in advance.

Edited by graphicabyss
Posted

Ah, thanks for replying to this, really cool.

I had pasted in the incorrect ID, this one is correct:
 

@media screen and (max-width: 640px) {
#block-yui_3_17_2_1_1689763110049_14549 {
display: none !important;
}
}

  • Solution
Posted

@graphicabyss  Is it removing the image in the mobile preview, but not on your phone? If so, then you may have to adjust the max width to 720. I had to do this for a client recently.

@media screen and (max-width: 720px) {
#block-yui_3_17_2_1_1689763110049_14549 {
display: none !important;
}
}

Did I help? Click 👍 or mark it as the solution! This helps others find the answers they need. 

Meghan | Westerly Creative Studio
  
 🍪  Still need your website policies?
Termageddon makes it easy.  
Get 10% off your first year! (< affiliate link) 

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.