How can I hide specific sections on mobile view?

I have read through numerous posts on this but I can’t seem to get it right.

I have created an Image with Text Overlay in my theme (Debut) that I want to show on desktop view. This image is too large for mobile view so I created a custom content image that works perfect on the mobile view. The only issue is I don’t want the text overlay image to show on mobile view and then I don’t want the custom content image to show on the desktop view.

Can someone please help me fix this!

Thank you!!

Hello Vitadamore,
Please share your site url.
So that i can check and let you know the exact solution here.

Thank you for your response @oscprofessional

the website is https://vita-d-amore.myshopify.com

password: dockao

the top image should be for the desktop view and then the bottom for mobile view.

thank you!

Hello Vitadamore,
Add this css at the bottom of
Online Store->Theme->Edit code->Assets->theme.css.liquid

@media only screen and (min-width: 750px){
#shopify-section-1600576224664 {
    display: none;
}
}
@media only screen and (max-width: 749px){
#shopify-section-hero-1 {
    display: none;
}
}

@oscprofessional it worked!! Thank you!!

Hi @oscprofessional ! I’ve been reading forums and I’ve seen your responses on a few with this same issue. How are you finding the shopify section number to place in the css? I’m struggling with the same thing and would like to hide a section. Where should I look in the source code to find the section number so that I can modify the code myself?

2 Likes

Hello - how do i find out the correct section id - would be very helpful. thanks

1 Like

Did you find that out? @Ejejstanley

1 Like

Hi everyone,

Stop looking for section ID. Just look for first “<” bracket to the section you want to hide. Follow the tutorial below. It works on any section or any theme.

@Ejejstanley ,

Please share the issue which section you want to delete ? with screenshot and share the URL with password.

@gkleind96 ,

Please share the issue which section you want to delete ? with screenshot and share the URL with password.