Hello!
I need to see your sidebar in action. Can you provide a link?
Thread Starter
wlltat
(@wlltat)
Hi,
Here is the website link.
https://www.writinglaw.com/all-rules-on-advocates-different-duties/
You can see that main primary sidebar on right has a light grey colour. After you scroll down the post, you can see that the fixed widget has no grey background colour.
It would be great if you tell me a way (css or some other way) to add colour to background in fixed widget.
Thank You
Yes, I see it.
First you can assign background to .widget class:
.widget {
background: #f8f8f8;
}
But sidebar has 15px of left and right padding. It would be better to change sidebar paddings to 0, and add 0 15px padding to widgets
Thread Starter
wlltat
(@wlltat)
Using this CSS it changes the background of all widgets including those in website footer, sub footer and elsewhere. How do I use it to change only for fixed widget?
I already use-
.sidebar { background: #f8f8f8;}
for primary sidebar background.
(I am not able to find the exact widget class or widget id of this fixed widget.)
(Also, is there a CSS to change sidebar padding.)
I have very limited coding knowledge.
Thank You
You cannot specifically target only fixed widgets, but you can be more precise:
.sidebar-primary .widget – that will target only sidebar widgets.
I already use-
.sidebar { background: #f8f8f8;}
for primary sidebar background.
That is not enought, because sidebar has limited height!