rudrang Posted March 4 Share Posted March 4 Hi again! I am facing this issue in a sidebar layout. I try to pin the sidebar and am successful in that but the main content, which is a grid with 2 column layout, overlaps the sidebar as soon as the sidebar is pinned. It seems to be resolved when I use predefined values for the columns instead of 1fr units. I tried making the sidebar sticky using CSS (not GSAP) and there was no overlapping of the sidebar/ overflowing of the main content. Here is the link for the demo. What am I missing here? Thanks! Link to comment Share on other sites More sharing options...
Solution mvaneijgen Posted March 4 Solution Share Posted March 4 Just add an extra div to the sidebar, and set that as the pinned element. Hope it helps and happy tweening! https://stackblitz.com/edit/vitejs-vite-znkfam?file=src%2FApp.jsx 2 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now