I have a div containing two buttons, and I want the div to be fixed in place, and if I resize the browser, it should not change its position.
I tried to use the position: fixed, but it doesnβt work, and when resizing, the position changes.
This is my CSS:
html { height: 100%; } body { margin: 0; padding: 0; width: 100%; background-image: url('../images/bgPat3.png'); background-repeat: repeat; } .Imagebuttons { position:absolute; top:494px; right:337px; }
This is my DIV container:
<div class="Imagebuttons"> <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/images/Image1.png" /> <asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="~/images/Image2.png" /><br /> </div>
Here's what it looks like now:
Before resizing:

After resizing:

source share