Archived topic
Sticky left sidebar and styling without plugin!
9 replies · Started by techs on June 30, 2020
Today I tried WP Sticky Sidebar and it is working. I want to avoid installing a plugin if it can be done with simple code.
Simply I don't want to use any plugins for this customization!
Hi there,
You could try this:
https://generatepress.com/forums/topic/side-bar-sticky/#post-1306008
I already tried this code:
@media(min-width: 769px) {
#left-sidebar {
position: -webkit-sticky;
position: sticky;
top: 80px; /* Adjust value to increase space above */
}
}
And it is going to right!
Hi there,
you have this topic:
if that works correctly, then you can add this CSS:
.left-sidebar #left-sidebar .inside-left-sidebar {
height: 100%;
}
.left-sidebar #left-sidebar .inside-left-sidebar .widget_nav_menu {
position: -webkit-sticky;
position: sticky;
top: 50px;
}
Perfect! It is now working fine!
Glad we could be of help
Hi, I tried implementing your CSS, but it's not sticky. Can you help me take a look at what went wrong?
https://myterrariumgarden.com/air-plant-terrarium/
Thank you so much!
Best,
Winnie
Can you open a new topic with reference to this one?
Also please disable your caching plugin for us to look at the code.
Thanks!
sure, will do. thanks.
No problem :)