Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is It Possible to Easily Remove Absolute Positioning

Status
Not open for further replies.

Mike555

Technical User
Feb 21, 2003
1,200
US
I have an asp.net app which uses absolute positioning for everything. The problem is that when the application is displayed in a browser with the Browser's Text Size setting set to Large or Largest, the controls are jumbled all over the place. Everyone tells me that this is caused by absolute positioning, but can anyone tell me how I can easily fix it without having to go back and place all the controls in tables? Thanks.


--
Not until I became a Network Administrator did the error message "See your Network Administrator for assistance" become petrifying.
 
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 360px; POSITION: absolute; TOP: 104px"
runat="server"></asp:TextBox>
</form>
</body>


Remove: MS_POSITIONING="GridLayout"
Remove: style="Z-INDEX: 101; LEFT: 360px; POSITION: absolute; TOP: 104px"



 
RTomes, Thanks for the reply. When I remove the style attribute my controls appear in the upper-left hand corner of the screen and I cannot position them back where they belong.


--
Not until I became a Network Administrator did the error message "See your Network Administrator for assistance" become petrifying.
 
that is because you are in flowlayout mode

you only have 2 choices... flow or grid layout
 
Mike, why dont you create an external stylesheet and setup the classes for the control, this way you can test and control the positioning without touching your aspx file!

Good luck


What would you attempt to accomplish if you knew you would not fail?
 
Just remember that flow layout works like a word processor. You will not be able to drag your controls where you want them. Instead you are going to have to use more of the HTML for things like <br><center> (or <div align="center">).

I like using CSS but it will probably present a lot of work for you.
 
Thanks everyone for the suggestions. Looks like this programmer is going to have to invest some time to learn more about web design!


--
Not until I became a Network Administrator did the error message "See your Network Administrator for assistance" become petrifying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top