I have this HTML
<div class="parent">
<p>msg 1</p>
<p>msg 2</p>
<div class="proceed-msg">You want to proceed ? </div>
</div>
AND CSS
.parent {
height: 300px;
overflow-y: scroll;
border: 2px solid black;
width: 200px;
position: relative;
}
.proceed-msg {
position: absolute;
bottom: 0px;
}
so everything is working as expected. My proceed message is at the bottom of the div. But if i have more messages, i need to have scrollbar at the div so that is the reason i putted scroll-bar:y in my parent div.
But when i have a lot of messages, my proceed-msg
div is overlapping them.
<div class="parent">
<p>msg 1</p>
<p>msg 2</p>
<p>msg 2</p>
<p>msg 2</p>
<p>msg 2</p>
<p>msg 2</p>
<p>msg 2</p>
<p>msg 2</p>
<p>msg 2</p>
<p>msg 2</p>
<p>msg 2</p>
<p>msg 2</p>
<div class="proceed-msg">You want to proceed ? </div>
</div>
i need to put my proceed-msg always at the end - also when i have scrollbar in the div
How can i do that