Centering controls on a .aspx page

S

sagars76

I want to center a control at the middle of the page. When the window size is
changed the control should get centered automatically. I have used flowlayout
with the following code. But it doesn't work
<asp:label id="lblProject" style="Z-INDEX: 105; POSITION: relative; TOP:
136px; ALIGN: MIDDLE" runat="server" Font-Size="Medium" Font-Bold="True"
Width="272px">PROJECT STATUS</asp:label>
 
H

HoustonFreeways

I'm not sure exactly what you're doing (is there anything else on the
page?), but have you tried using a DIV element around the control and
setting align, or a control that supports vertical-align or valign on a
container the uses up the whole page?
 
S

sagars76

I am trying to use a label control to display an entire table with 4 columns
and numerous rows. If I use the div element the label control gets centered
but the 4 columns to the right of the control and white space to the left of
the control makes the table page appear very odd. I want the table that is
displayed withing the label control to be centered in the middle of the page
and not the label control itself. I used align ="center" attribute for the
table with the label control string but it doesn't work. Please enlighten me
with your valuable opinion as how to overcome this problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top