Hi I want to use a floating save button in my div
.fw_circle{
background-color: #53beb6;
position: fixed;
bottom: 20px;
right: 20px;
width: 55px;
height: 55px;
border-radius: 50%;
text-align: center;
font-size: 20px;
padding: 13px;
color: white;
z-index: 100;
}
<div class="div1">
<!-- Floating save button -->
<div class="fw_circle">
<i class="fa fa-floppy-o" aria-hidden="true"></i>
</div>
<div class="form-group">
<label>Name:</label>
<input type="text" ng-model="Name" class="form-control" maxlength="200" required/>
</div>
<div class="form-group">
<label>Name2:</label>
<input type="text" ng-model="Name2" class="form-control" maxlength="200" required/>
</div>
<div class="form-group">
<label>Name3:</label>
<input type="text" ng-model="Name3" class="form-control" maxlength="200" required/>
</div>
<div class="form-group">
<label>Name4:</label>
<input type="text" ng-model="Name4" class="form-control" maxlength="200" required/>
</div>
<!-- And so many other input fields-->
</div>
<div class="div2">
<!--Don't want that float button to be shown in this div as it has only a save button -->
<button class="btn">Save</button>
</div>
I want that the floating button should be visible in above div (i.e div1) with input fields
So that the user can save the form anytime in between and no need to scroll to the bottom to save the form.
But when he scrolled to the bottom and then he can see the save button in another div (i.e div2), in that case, the floating button should not be visible.
And the actual Save button is not exactly at the bottom of page
But the floating button is showing even if the save button is visible. Please suggest some method to achieve this.