Background image within CSS file and responsive design

I try to set a background image but like to manage responsive design. Is it possible from CSS file or code should be moved into HTML where is STYLE element?

Code is the following:

backgroundClass1 {background-image: url("../images/background/image.JPG");
}

It is an issue as background image should be hidden when mobile resolution is detected and image is inside CSS file.

It doesn’t matter where your css is located. You can always change it with more css.

How are you detecting mobile?

If you mean small screen media queries then you can change, show or hide whatever you like from the css.

If you mean you have some sort of js mobile detection going on then you would need perhaps to add a dynamic class to the body and then use that class to hide your image via css.

Thank you for the message. I will do your suggestion:
If you mean small screen media queries then you can change, show or hide whatever you like from the css.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.