I am currently utilizing the Ajax UpdateProgress with a loading gif attached. The issue I am facing is how to ensure that the loading.gif always appears in the center of the screen, even if the user is at the very top or bottom of the page. Is there a method to keep it consistently centered? My goal is for users to always see the loading gif in the center so they are aware that the page is still loading.
.CenterPB
{
position: absolute;
left: 50%;
top: 50%;
margin-top: -20px; /* adjust this value based on your image/element height */
margin-left: -20px; /* adjust this value based on your image/element width */
width:auto;
height:auto;
}
<asp:UpdateProgress ID="UpdateProgress1" runat="server" DynamicLayout="false">
<ProgressTemplate>
<div class="CenterPB" style="height: 40px; width: 40px;">
<asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Default/images/progressbar1.gif"
Height="35px" Width="35px" />
Loading ...
</div>
</ProgressTemplate>
</asp:UpdateProgress>
Many thanks!