hide an animation over the image banner for the mobile version of my website

Topic summary

A user wants to hide a rotating animation on their mobile site’s image banner while keeping it visible on desktop. Before hiding it, they also need to redirect the animation to their collections page (https://swaws.store), similar to the desktop version.

Two solutions were provided:

  • Solution 1 (BSS-TekLabs): Add CSS code to base.css or theme.css file:

    @media only screen and (max-width: 600px) {
      .animation_image img {
        display: none !important;
      }
    }
    
  • Solution 2 (niraj_patel): Insert CSS in theme.liquid file before </body> tag:

    @media screen and (max-width: 767px) {
      .banner .animation_image {
        display: none !important;
      }
    }
    

Both solutions use media queries to target mobile devices specifically. A follow-up question confirmed these solutions only affect the mobile version, not desktop. Screenshots were included showing implementation steps.

Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

can you hide the rotating animation only on the mobile version of my website and also before hiding attach the link same as desktop website where it is redirecting it to collections page https://swawe.store/

1 Like
  • Here is the solution for you @attackon
  • Please follow these steps:

  • Then find the base.css or theme.css file.
  • Then add the following code at the end of the file and press β€˜Save’ to save it.
@media only screen and (max-width: 600px) {
.animation_image img {
    display: none !;
}
}
  • Here is the result you will achieve:

  • Please press β€˜Like’ and mark it as β€˜Solution’ if you find it helpful. Thank you.
1 Like

Hello @attackon

You can add code by following these steps

  1. Go to Online Store β†’ Theme β†’ Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

@media screen and (max-width: 767px) { .banner .animation_image{ display: none !important; } }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Great! But will it work separately for mobile version only as initially asked?

1 Like

Yes. It only works on mobile version.

1 Like