I’m trying to create my own table of content and have a gred with 2 column inside both columns i have a container. I assigned one container a CSS class which i named: toc-sticky, thats the container that i would want to have as sticky and then i put below code under the custom css:
.toc-sticky {
position: sticky;
top: 50px;
overflow: scroll;
}
but i can’t get it working, the container doesn’t stick when i scroll.
Another question would be, is it possible to make it this container as sticky on mobile as well? on mobile i would want it showing the expanded table of content but once you scroll it sticks on top of the page with a dropdown showing one heading and next to it a down arrow that indicates that you can expand it to access the other heading in the TOC