Site logo

Archived topic

Css to hide background?

7 replies · Started by esteban on December 20, 2018

Viewing posts 1–8 of 8

Hello!

I am working on a new website. I work with Elementor and Generate Press.

I want to know if there is any CSS to hide background on mobile an Tablet ?

I try this but it doesnt work:

@media only screen and (max-width: 600px) {
body {
background-image:none;
}

}

Hi there,

There isn't a body background image added from what I can tell.

Perhaps you are referring to something that's added from Elementor?

If so you will have to check with their support. Maybe there is a setting within their plugin that can do this for you.

Let me know if I'm missing something :)

Thanks Leo for your answer.

The background is added from elementor.

They told me to duplicate it and create 1 for desktop and 1 for Mobile. I was wondering if there is any other possibility.

Thanks

Hi there,

if you want to remove the background image from the very top section then select the Section > Advanced > CSS classes and add this class: no-mobile-background

Then add this CSS to your style sheet or additional CSS:

@media (max-width: 767px) {
    .no-mobile-background {
        background-image: none !important;
    }
}

You can re-use that class on any section you want to remove the background image from.

I updated the code above to give the property some importance.

Thanks a lot!

It works :)

You're welcome.

This archived topic is closed to new replies.