I'm trying to make a sidebar that will scroll with the page, and when its bottom reaches the page footer, it will stop scrolling and stay in place.
Like it is explained here, and like in this fiddle.
The problem is, I'm using some Bootstrap 3, and I believe I can't achieve the same result because of some properties on its CSS. Instead of the sidebar staying at the bottom, it goes back up after it reaches the footer.
This is my layout structure.
<nav class=navbar></nav>
<div class=container id=wrapper>
<div class=row>
<div class=col-sm-8 id=blog-main></div>
<div class=col-sm-4 id=blog-sidebar></div>
</div>
</div>
<div id='blog-footer'></div>
Fiddle: https://jsfiddle.net/mpxrqwwf/7/
I tried putting blog-sidebar
inside a wrapper div, with position: absolute
on it and with position: relative
on the main wrapper, but it broke the layout and the scrolling still did not work as I expected. Thanks in advance for the help.