2011-07-21 13 views
5

私は更新の進捗状況に関する問い合わせを受けています。 画面の中央に更新プログレスパネルを合わせたい! 誰もが私に示唆することができます、それを作るのアイデアは何ですか?更新進行中のパネルを中央に作成

答えて

5

あなたはCSS

<style type="text/css" media="screen"> 
/* commented backslash hack for ie5mac \*/ 
html, body{height:100%;} 
/* end hack */ 
.CenterPB{ 
position: absolute; 
left: 50%; 
top: 50%; 
margin-top: -30px; /* make this half your image/element height */ 
margin-left: -30px; /* make this half your image/element width */ 
} 
</style> 

とを使用することにより、あなたはdivの中にプログレスバーを持っていることを行うことができます

<div class="CenterPB" style="height:60px;width:60px;" >Progress bar here</div> 

参照:あなたはjQueryのを使用している場合
http://www.sitepoint.com/forums/1243542-post9.html
http://www.search-this.com/2008/05/15/easy-vertical-centering-with-css/

+0

あなたのご返信ありがとうございました。できます!!! – Shreya

0

システムが処理している間にアップデートの進行状況パネルは何か(いくつかのテキスト、画像、いくつかのマークアップ)が表示されます。..

だからあなたはあなたが追加したマークアップで作業する必要があります。..

たとえば、あなたが持っている場合あなたがそれを表示するdivは、このように中央に来るようにすることができます。

<div style="width:200px;margin:0 auto;">Processing...</div> 

divをコンテナの中央に表示します。

全例:もちろん

<asp:UpdatePanel ID="updatepnl1" runat="server"> 
    <ContentTemplate> 
     <asp:GridView id="gv1" runat="server"> 
     </asp:GridView> 
     <asp:UpdateProgress id="UpdateProg" runat="server"> 
      <ProgressTemplate> 
       <div style="width:200px;margin:0 auto;">Processing...</div> 
      </ProgressTemplate> 
     </asp:UpdateTemplate> 
    </asp:ContentTemplate> 
</asp:UpdatePanel> 

あなたはcssファイルにCSSを入れて、クラスにそれを適用する必要があります。

同様:

///Start css 

.posCentre{width:200px;margin:0 auto;} 

///End css 

とするためにあなたのdivを変更:

<div class="posCentre">Processing...</div> 
+0

@ davMcLean:ありがとう4 ur reply !! – Shreya

+0

心配する必要はありません、それが役に立つと願っています。 –

関連する問題