How can I hide a banner from desktop view only?

Greetings! I want to hide this banner from desktop view and show it only in mobile. How can I achieve it?

website link: techshieldny.com

Hi @uchiha123 ,

Follow these Steps:

  1. Go to Online Store
  2. Edit Code
  3. Find theme.liquid file
  4. Add the following code just above tag

If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

Best Regards,
Makka

you can do it using css only for example here i am using banner-sec as major class but you can use your main class as well rest of the procedure is same

like for desktop

@media (min-width:768px) { .banner-sec img { display:none; } } for mobile @media (max-width:768px) { .banner-sec img { display:block; } }

but then you can adjust the size and other properties according to your own need

1 Like

Worked Thank you! :+1: