tags:

views:

21

answers:

1

Hi, I have the Progress bar div and the asp:label inside it. How to style it to have that Label inside it and in the middle of that div ?

<div id="progressbar" style="width: 350px;">
    <asp:Label ID="percentLabel" runat="server" Text="0" />
</div>
+1  A: 

One way (if you use it as inline) is to set text-align:center on the div.

Alternatively, if you want to use it as a block element, you should set the following properties on the label display:block, width: XXpx (where XX < than 350px) and margin:0px auto which means have equal distance from the sides, thus centered..

Gaby