[SOLVED] CSS selector with OR condition


This Content is from Stack Overflow. Question asked by Simone Tocco

I am trying to select two selectors present in two different pages and I would like them to be applied if when the selector is detected (home page OR room page). I’m trying this but it doesn’t work:

body: not (.home), body: not (.single-room) .gdlr-core-privacy-box-wrap.gdlr-core-pos-bottom-bar {bottom: 90px;}


From your description i understand that you are trying to select the .gdlr-core-privacy-box-wrap.gdlr-core-pos-bottom-bar element both when the body has the class home or it has the class single-room. For that i think something like this would work:

body:is(.home, .single-room) .gdlr-core-privacy-box-wrap.gdlr-core-pos-bottom-bar {
    bottom: 90px

This Question was asked in StackOverflow by Simone Tocco and Answered by Boguz It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?