Replicate the old floating button

I will simplify the CSS code to make it shorter and avoid repeating properties.
Here, I have added the class name “floating,” which is appended to the existing class name specifically to handle the sticky functionality, while the bottom property is handled by sub-classes as before.

#page-root .floating {
position:sticky;
z-index:99999;
width: fit-content;
margin-left: auto;
margin-top: 0rem;
margin-bottom: 0rem;
}
#page-root .open-close {
bottom:0px;
}
#page-root .float-1 {
bottom:120px;
}
#page-root .float-2 {
bottom:180px;
}
#page-root .float-3 {
bottom:240px;
}
5 Likes