[Resolved] Hiding Background Image on Mobile

Home Forums Support [Resolved] Hiding Background Image on Mobile

Home Forums Support Hiding Background Image on Mobile

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1623845
    Ben

    Hey guys,

    How do I remove background images on mobile?

    I’d added the following the additional CSS panel:


    @media
    (max-width: 768px) {
    .gb-container.no-mobile-background {
    background-image: none;
    }
    }

    Then I’ve added the following class to the container:

    no-mobile-background

    However, the image still displays on mobile.

    How would I hide it on mobile?

    Thanks

    #1623913
    David
    Staff
    Customer Support

    Hi there,

    try this CSS:

    @media (max-width: 768px) {
        .gb-container.no-mobile-background,
        .gb-container.no-mobile-background:before {
            background-image: none;
        }
    }

    When the background is set as a Pseudo Element it moves it to the :before pseudo element – that CSS will cover both element types

    #1725408
    Mathieu

    Hello,

    I tried the code above but it doesn’t seem to work.

    I only have one background image set for the body, and I would like to disable it for mobile view.

    Is there another code I can try?

    Many thanks!

    Mat

    #1725418
    Leo
    Staff
    Customer Support

    Can you open a new topic for your question and link us to the page in question?

    Thanks ๐Ÿ™‚

    #1725436
    Mathieu

    No problem!

    #1725444
    Leo
    Staff
    Customer Support
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.