I would like to use the page scroll effect so that only the content of the #right element is scrolled in the layout. A similar effect can be seen on Facebook when scrolling posts (posts are scrolled while the left panel and upper bar remain in place). Any of you have an idea how can I get the same effect for my #right container in the code?
#header,#footer{
width:100%;
height:80px;
background:blue;
}
#content{
width:1000px;
margin:0 auto;
overflow:hidden;
}
#left{
width:200px;
float:left;
background:green;
margin:20px 0;
height:100vh;
}
#right{
float:right;
width:calc(100% - 220px);
}
.item{
height:80px;
margin:20px 0;
background:red;
}
<div id="header">
header
</div>
<div id="content">
<div id="left">
left
</div>
<div id="right">
<!-- this content is scrolling-->
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
<div class="item">item</div>
</div>
</div>
<div id="footer">
footer
</div>