Editing .x-container.max everywhere except home

Hi there!

I’m trying to edit the ccs for .x-container.max on my website (link in secure note) everywhere EXCEPT on the homepage. I’ve tried to use the selector .x-container.max:not(.home) but it didn’t exclude the css from the homepage. Is there another way to achieve the same?

I want to add the following CSS everywhere except on home:

.x-container.max {
max-width: 1000px;
background-color: white;
padding: 30px 30px 30px 30px;
}
.x-container.offset {
margin: 0em auto;
}

Thanks in advance!

-Karianne van Buro Vink

Hello Karianne,

The home class is added to the the body class of the homepage so you can update your code to:

body:not(.home) .x-container.max {
    max-width: 1000px;
    background-color: white;
    padding: 30px 30px 30px 30px;
}

body:not(.home) .x-container.offset {
    margin: 0em auto;
}

https://www.w3schools.com/cssref/sel_not.asp

Hope this helps.

That worked great! Thanks so much!

-Karianne van Buro Vink

You’re most welcome, Karianne.

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