Archived topic
Sticky Widget Issue
5 replies · Started by Sundry on August 19, 2022
If I add a second element for i.e. Ads then none of the elements stick. But if I keep only one element, it works fine as a sticky object in the widget bar. Please tell me how to fix it.
Hi Sundry,
Your current CSS is targeting the last widget in your sidebar to be sticky.
@media (min-width: 769px)
.inside-right-sidebar aside:last-child {
position: -webkit-stcky;
position: sticky;
top: 10px;
}
}
If you'd like the entire sidebar to be sticky, try this CSS instead:
@media (min-width: 769px)
.inside-right-sidebar {
position: -webkit-stcky;
position: sticky;
top: 10px;
}
}
and remove this CSS:
@media (min-width: 769px)
.inside-right-sidebar {
height: 100%;
}
}
Do you mean Customize>Additional CSS or Appearance>functions.php? Where I have to replace it?
It's CSS, so customizer > additional CSS it is :)
But you need to find the previously added 2 pieces of CSS, remove one and replace the other one following my instruction.
I can see only two @media in +CSS.
@media (max-width:768px){.post-image-aligned-left .post-image img{margin-top:-20px;border-radius:12px;box-shadow:rgba(23,43,99,.2) 0 7px 28px!important}}@media (min-width:769px){.post-image-aligned-left .post-image img
Can you please guide which one to replace?
The CSS might not be directly under the media query, as you are using the cache plugin, I can't tell what the exact CSS is.
If you can disable your cache plugin, I will have a better idea.