In this Fiddle, I try to keep the panel always at the bottom left, even if the user scrolls the container. Currently, if I scroll the container, the panel moves, and will not always attach to the footer.
Although this is similar to the default behavior, I did not know about it. So any explanation would be really helpful. (My guess was that it would be attached to the bottom of the container).
What to consider:
- The bar should cross the horizontal scroll bar of the container when resizing horizontally. (what is happening now)
- The bar should always be at the bottom of the container. (not happening)
.parent {
width: 60%;
height: 300px;
position: absolute;
background-color: tomato;
overflow: auto;
}
.content {
height: 18000px;
width: 300px;
background-color: firebrick;
}
.bar {
position: absolute;
bottom: 0;
left: 0;
line-height: 20px;
text-align: center;
width: 50px;
height: 20px;
background-color: beige;
}
<div class="parent">
<div class="content"></div>
<div class="bar">BAR</div>
</div>
Run code