Archived topic
"Add css" not working
6 replies · Started by Iain on May 15, 2017
Hi Team
What am I doing wrong??!! I am wanting to change the background color of one widget. I installed the simple plugin "Widget CSS Classes" that allows me to give the widget a classs then added the class in "Add Css" but no matter what I change, nothing is changing in the widget. I can see the class when I inspect the widget. I must be missing something really obvious.
(WP, GP and GP Premium all up to date).
Many thanks
Hi Iain,
No need a for a plugin if you want to change the background color of one footer widget, try this CSS:
.inside-footer-widgets .footer-widget-1 {
background-color: #000000;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know if this answers your question.
That would apply to the entire widget area, Leo - not just one widget.
Iain - can you share the CSS you're using?
hi Tom
it's local at the moment so hopefully the screenshots will be sufficient:
widget with class:
widget with class showing in inspector: 
css added (with Simple Css installed) 
I usually let my developers handle this osert of thing but I a doing this as a pet project so please excuse me if I have made an obvious mistake.
Try this:
.sidebar .widget.sidebarmenu1 {
background-color: #1a1a1a;
}
there it is!! I knew it was something simple.
Thanks as always Tom.
You're welcome :)