Home All Groups Group Topic Archive Search About

Absolute vs. Relative vs. my sanity...

Author
6 Mar 2006 4:16 PM
Rob R. Ainscough
Ok, I gotta say I now believe in Voodoo & Magic after working with VS 2005
developing web pages.

I have a standard ASPX web page, the only two controls on the page are a
Label Control (WebControls.Label) and a Button (WebControls.Button).  If I
place both controls using Layout = Relative they look correct on the web
page.  But when I run the project they're relocated off screen somewhere.
If I go back to design mode and go into "Source" mode on the web page, I see
that left is set to -275px, and top = -20px???  So, if I switch either of
the controls to Layout = Absolute, both controls move OFF the web page (in
design mode) and I have to go into Source again and manually set the
left/top.

Can someone tell me WTF is going on with the VS 2005 IDE and why would it do
this?  Is it because I have a dual monitor system or is it just some other
sadistic bug in VS 2005?

(cross posted on dotnet.general also -- apologize if this causes issues).

Rob.

Author
10 Mar 2006 8:29 PM
Steve C. Orr [MVP, MCSD]
I'd suggest you go with relative and manually remove the left & top
attributes so they'll stop giving you grief.
Here's more info:
http://SteveOrr.net/articles/ControlPositioning.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


Show quoteHide quote
"Rob R. Ainscough" <roba***@pacbell.net> wrote in message
news:ulEDOlTQGHA.3460@TK2MSFTNGP15.phx.gbl...
> Ok, I gotta say I now believe in Voodoo & Magic after working with VS 2005
> developing web pages.
>
> I have a standard ASPX web page, the only two controls on the page are a
> Label Control (WebControls.Label) and a Button (WebControls.Button).  If I
> place both controls using Layout = Relative they look correct on the web
> page.  But when I run the project they're relocated off screen somewhere.
> If I go back to design mode and go into "Source" mode on the web page, I
> see that left is set to -275px, and top = -20px???  So, if I switch either
> of the controls to Layout = Absolute, both controls move OFF the web page
> (in design mode) and I have to go into Source again and manually set the
> left/top.
>
> Can someone tell me WTF is going on with the VS 2005 IDE and why would it
> do this?  Is it because I have a dual monitor system or is it just some
> other sadistic bug in VS 2005?
>
> (cross posted on dotnet.general also -- apologize if this causes issues).
>
> Rob.
>