Is there a possible way to fix the boxes in below snippet at there initial state (present at bottom) whether scroll horizontally or vertically
#styleChangeOuterTag {
/* display: none; */
/* position: fixed; */
position: relative;
top: 0;
left: 0;
width: 300px;
height: 100px;
padding: 2vw 1.5vw;
background-color: rgb(255, 245, 245);
border: 2px solid rgb(255, 60, 255);
border-radius: 3px;
z-index: 5;
overflow: auto;
user-select: none;
}
#styleChangeOuterTag::after {
content: '';
background-color: #ccc;
position: absolute;
bottom: 0;
left: 0;
width: 20px;
height: 20px;
cursor: nesw-resize;
}
#anotherBox {
background-color: red;
position: absolute;
bottom: 0;
right: 0;
width: 20px;
height: 20px;
cursor: nwse-resize;
}
#styleOptionDetails {
border: 2px solid purple;
border-radius: 3px;
padding: 1vw;
overflow: auto;
}
<div id="styleChangeOuterTag">
ContentContentContentContentContentContentContentContentContentContentContentContentContentContentContentContent
<hr>
<div id="styleOptionDetails">
t<br> Content
<br> Content
<br> Content
<br> Content
<br> Content
<br> Content
<br> Content
<br> Content
<br> Content
<br> Content
<br> Content
<br> >
</div>
<div id="anotherBox">
</div>
</div>
I tried to use sticky(possible on id
#anotherBox
not on ::after
) but with that it comes to its original position when scroll completes.
Another option left is fixed
with that have to reposition box with respect to document
(screen
). So don't change position when container is resized using them
The container is resizable with these boxes so wanted them to remain in position at bottom and move with the container when change in size of container.
So this is the reason I wanted them to remain in the initial state(fixed state when scroll) but move with the conatiner when resized
Resizable part is not important so not added here . If needed can provide
Thanks for help in advance