0

I have a webform and the user needs to click on 'save' often. So I'm trying to float the Save Button.

#floatButton {
   position: fixed;
   top: 900px;
   right: 90px;   
   text-align: center;    
}
<div id="floatButton">
    <asp:Button ID="SaveButton" runat="server" 
    onclick="SaveButton_Click" Text="Save" / >
</div>

The button looks good and floats with my current display settings(standard resolution). But on different display settings the button goes out of the form either towards the right of the form or at the bottom. I tried setting the position to 'relative' and 'absolute'. It didn't help. I would like to have the button within the form in all resolutions. How do I set that?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Lotus
  • 225
  • 1
  • 4
  • 13

1 Answers1

0

Try position: relative; for parent div and position: absolute for .floatbutton and fix the top and left accordingly