Hello. We would like to make the blog sidebar sticky. Is there an option for that?
see: https://webers-testseite.de/sticky-sidebar/
see usage in a real environment: https://clean.webers-testseite.de/datenschutz/
______
or for sticky elements : https://webers-testseite.de/sticky-elements/
Hi,
Thanks for sharing Guenni007, were you able to achieve this menainfosec?
Best regards,
Mike
Hi Guenni,
I couldn’t understand the code on the pages you shared.
In the first link, the opening sentence and the comments actually say all you need to know. :
It is important that the immediate parent container of the elements (on which one should be sticky) is at display: flex
There are a lot of settings on flex containers – but this is the essential condition
on the image
you can see that for the sidebar (aside) the direct parent element is the div with the class: container.
The sidebar itself got that position sticky – the top value determines the distance to top.
This for sticky position inside the parent container.
But:
/*** the whole thing only works if top containers are set to: ***/
.responsive #top {
overflow-x: visible;
}
#top #wrap_all {
overflow: visible;
}