Is there a way to keep an element fixed on the display without using position: fixed? I want the element to always remain above other elements, so I used z-index. Additionally, I would like the element to be able to move horizontally without scrolling across the display. Here is the code snippet I am currently working with:
<div style="position:relative;z-index:3;height:100%">
<div style="position:absolute;bottom: -460px;right:-30px;height:100%;">
<div style="position: sticky;top: 800px;">
<a class="btn btn-default dropdown-toggle" style="background-color:#00AF95;border-radius:50%;margin-left:100px;" data-toggle="dropdown" onclick="$('#floatingButton').toggle();" data-hover="dropdown" aria-expanded="true">
<i class="fa fa-plus" style="background-color:#00AF95;color:#f7f8fa"></i>
</a>
<div class="dropdown dropdown-inline" style="width:250px;display:block;bottom:80px;">
<ul class="dropdown-menu SMSUI" role="menu" id="floatingButton" style="display: block;">
<li class="dropdown" data-hover="dropdown" title="Send SMS to a Number"[enter image description here][1] onclick="(this.event.stopPropagation());">
<div id="numberDialerField" class="pad10R pad10L">
<input type="text" id="phoneCodeNumber" style="margin-left:10px;width:60px;" name="phoneCode" class="softphone-form-control" data-i18n="[placeholder]phonecode" placeholder="Ph. Code" value="">
<span>-</span>
<input type="text" id="telNumber" name="phoneNumber" class="softphone-form-control" data-i18n="[placeholder]label_phone_number" placeholder="Phone Number" value="" required="">
<div class="telFuncBtnDiv">
<span id="backspaceBtnSpan" class="cursor-pointer">
<i class="fa fa-check fa-xs"></i>
</span>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
I have included a sample image for reference that shows what I am trying to achieve, although it doesn't quite meet my requirements. My goal is to have the movable element stay fixed without the use of position: fixed.
I want the Icon to stay at this position without position: fixed