Archived topic
Sidebar Sticky Widget Not Working
3 replies · Started by Shivam on July 29, 2022
Hey, I am using the following CSS to make the last widget stick while the user scroll down but it's not working:
@media (min-width: 769px) {
.site-content {
display: flex;
}
.inside-right-sidebar {
height: 100%;
}
.inside-right-sidebar aside:last-child {
position: -webkit-sticky;
position: sticky;
top: 40px; /*Adjust position */
}
}
I have attached the website link below
Hi there,
Google ads are inserting it height: auto style attributes on the elements it will be inserting its adverts in. Which breaks part of your CSS.
So in your CSS, change this:
.inside-right-sidebar {
height: 100%;
}
to:
.inside-right-sidebar {
height: 100%;
min-height: 100%;
}
Not working
It is - the issue is your last widget isn't displaying anything: