How to show the UpdateProgress contents at the center of monitor by using only CSS

  • Thread starter Thread starter Max2006
  • Start date Start date
M

Max2006

Hi,

I have the following code to show the UpdateProgress contents at the center
of page:

<asp:UpdateProgress ID="UpdateProgress1" runat="server"
AssociatedUpdatePanelID="UpdatePanel1"
DisplayAfter="0">
<ProgressTemplate>
<div id="Layer1" style="position:absolute; z-index:1; left: 50%;
top: 50%;">
<img alt = "Loading..." src ="../images/loader.gif" />
</div>
</ProgressTemplate>
</asp:UpdateProgress>


The problem is with long pages, so it shows the progress at the center of
the page, user have to scroll to the middle of the page to see the progress.
Is there any way to show the progress at the center of monitor (or browser)
as opposed to the center of page?

The CSS only solution would be preferable.

Any help would be appreciated,
Max
 
You'll have to go with a javascript solution if you want the exact
center of a browser window, as CSS can't interact with the browser to
determine how wide or long it is.
 
Hi Max,

I agree with Mark here that you will have to use JavaScript to keep the
progress div stay at the center of the screen.

Here're some related discussions on this issue:

#UpdateProgress Position in middle of screen - ASP.NET Forums
http://forums.asp.net/t/991307.aspx


#Matt Berseth: ASP.NET AJAX: Rendering a Gmail-like 'Loading' Indicator
over a Specific ASP.NET Control
http://mattberseth.com/blog/2007/06/aspnet_ajax_rendering_a_gmaill.html


Hope this helps.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Max,

I'm writing to check the status of this post. Please feel free to let me
know if there's anything else I can help. Thanks.




Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top