My whole site’s background is black and I want the other pages to be the same. The Background should be black and the text should be white.
You can do multiple ways:
- Grab the main element:
main {
background: #000;
color: #fff;
}
- Target a section class:
.shopify-policy__container {
background: #000;
color: #fff;
}
- Target their section id (which is assigned by shopify, permanent ID per each section, per each page (the ID below is example):
#shopify-section-template--16716130484455__939877b3-b65b-42ae-a394-662599fc6437 {
background: #000;
color: #fff;
}
- If for some reason, the template has divs or other elements inside, make sure to target their classes as well:
section, main, main + div, main > div {
background: #000;
color: #fff;
}
-
Use your browser developer tools to see the element tree and their class-names
-
For CSS selectors, visit w3schools > css selectors reference
This changes the bg color to black, but makes the text black too. Making the text unreadable
