I would like the colour of the entire sidebar to be different from the main page. I’ve already used the following quick css to make the widget area a different colour
.main_color .sidebar { background-color: #cfcdcf; color: #cfcdcf;
}
However the background colour to the right and below the widget area remains the same colour as the main page.
I was wondering if you can let me know the quick css to change this. Width is currently set to 75% main content and 25% sidebar.
Thanks
Paul
Hey paultho,
Please try adding this code to the Quick CSS section under Enfold > General Styling or to your child themes style.css file:
@media only screen and (min-width:989px) {
#main .container_wrap_first > .container {
padding-right:0!important;
}
.sidebar {
position: absolute;
top:0;
right:0;
padding-right:50px!important;
bottom:0;
max-width:calc(25% - 50px);
background:gold;
}}
Best regards,
Vinay
Thanks for that Vinay, that worked pretty well.
However, on pages with less text, some of the sidebar now gets chopped off at the bottom. Previously, I could continue to scroll down to see the rest of the sidebar. Do you have some CSS to correct that?
Example link in Private Content.
Thanks
Paul
Hi!
You can add an overflow:true to the sidebar, so you can combine it and have both effects.
Thank u
Regards,
Basilis
I tried adding overflow:true towards the end of the CSS provided earlier. – See snippet below.
max-width:calc(25% – 50px);
background:gold;
overflow.true;
}}
That didn’t make an difference, but I may not be doing it right.
If you can send me the complete CSS with this included in the right place that would be wonderful.
Thanks
Paul
Hi,
Please add
overflow-y: auto!important;
to “.sidebar” in the above code this will scroll the sidebar content on pages with less content.
Best regards,
Vinay
Thanks Vinay,
That worked a treat!
Kind regards
Paul