Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Need help on how to change background color in Antimatter theme

Started by Muut Archive 10 years ago · 8 replies · 1354 views
10 years ago

Hello I am new to Grav. So far I like it better than WordPress and I use it as replacement of Evernote.

I like the simplicity of Antimatter, however I would like to know on how to change the background color of my posts.

10 years ago

You need to add some custom CSS. Create a custom.css file in user/themes/antimatter/css. Antimatter will load it automatically if found.

CSS
#body {
    background-color: black;
}
10 years ago

I think overwriting the background of '#sb-site' should create your expected result

CSS

#sb-site {
   background: #000000;
}
---
10 years ago

I put

CSS
#sb-site {
   background: #000000;
}

in the custom.css but it changes nothing.

10 years ago

Okay I just tested it myself. The normal css was overwriting the custom css. I tried it with this snipped on a fresh GRAV installation and it worked.

CSS

#body { background-color: #000000; }

body #sb-site,
body .sb-site-container {  background-color: #000000;}
---
10 years ago

Oh cool thank you so much. Would you mind if you tell me how can you know the class/id name (#sb-site, .sb-site-container, etc)? Is there any documentation?

Now, I need to change the font to somewhat white-ish. I will open another thread.

10 years ago

I got the reference for #sb-site using View Source and Inspect Element in Chrome. But not for .sb-site-container.

But whatever thanks for helping. I will learn this eventually I hope.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1368 9 years ago
Archive · by Muut Archive, 9 years ago
2 940 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1125 9 years ago