I am trying to have a left sidebar using flexbox.
I'd like the sidebar to stay fixed and have its own scroll bar if needed. If the content is long and there is a scroll bar on the main content, I don't want the sidebar to move as I scroll down.
Here is an example of implementation: http://codepen.io/tedartus/pen/KmGYNm
The problem is that the sidebar is also moving when scrolling down.
I read a thread about "position fixed the sidebar with flexbox". I tried the solution of making the container as tall as the screen and only adding scrolling to the main content.
.wrapper {
display: flex;
height: 100vh;
}
.content {
flex: 1 1 auto;
overflow: auto;
}
It works but I don't see the scrollbar on the right anymore. Any idea why?
=> http://codepen.io/tedartus/pen/Pmygpq
I wanted to fix this first before moving to the sidebar's scrollbar.
Thanks