I use right sidebar with container
class
<div class="container">
<div class="col-8 col-md-8 col-sm-6">
main contents
</div>
<div class="col-4 col-md-4 col-sm-6 sidebar ">
side bar
</div>
Then make the right bar stick to the right side with this css.
However, it sticks to the right side of browser.
I want to stick to the right side of container width.
Is it possible?
.sidebar {
position: fixed;
top:0px;
right:0px;
display: block;
overflow-x: hidden;
overflow-y: auto
}