I have a container with 2 buttons on the left and right, and text in the middle. I want the text to scroll while the 2 buttons stay fixed to the bottom of the container, like in the image below.
But i want the scroll to be on the outer container. Have attached the html and css code below.
Also, when the lines are less than the height of the container, the buttons should still stick to the bottom of the container..
Please help.
PS: Both markup and css can be changed.
.container {
width: 400px;
height:200px;
border: 1px solid;
position:relative;
overflow:auto;
margin-bottom:4rem;
}
.line {
height:8px;
width:100%;
background-color: grey;
border-radius: 8px;
margin-bottom:20px;
}
.text{
padding: 5px 50px;
}
.button-wrapper{
position: absolute;
bottom: 4px;
}
.button{
width:32px;
height:32px;
background-color:orange;
}
.left {
left:4px;
}
.right{
right:4px;
}
<div class="container">
<div class="button-wrapper left">
<div class="button "></div>
</div>
<div class="text">
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
</div>
<div class="button-wrapper right">
<div class="button "></div>
</div>
</div>
