How do you set the postion of a web page control?
If one drags a control, say a button, from the Toolbox (VS 2008 - ASP.NET Website) to the default.aspx page in Design view, the button will always appear next to the last control entered, or if none has been entered, the upper left-hand corner of the page. Is there a way to manipulate this button to some absolute position on the page? The only properties I find in the button properties list is Height and Width. Perhaps a style sheet (*.css) is the way to set the button absolute position, but I can find no examples of such.
Please help. :)
Re: How do you set the postion of a web page control?
You use stylesheet and HTML to position the rendered controls/html.
Stylesheet is however a vast topic, so if just starting out, I'd advice you to build your page using html tables and position your controls inside those.
Once you get the hang of it - move on to learning about stylesheets and relative positioning.
Re: How do you set the postion of a web page control?
Thanks. Tables work. Style sheets are much more complex, but I've made some headway. How do position a asp:ContentPlaceHolder ? Same way using it's id and a # entry in the CSS. :)
Re: How do you set the postion of a web page control?
Quote:
Originally Posted by
Mike Pliam
Thanks. Tables work. Style sheets are much more complex, but I've made some headway. How do position a asp:ContentPlaceHolder ? Same way using it's id and a # entry in the CSS. :)
You don't position a ContentPlaceHolder as it is only a - well placeholder for content.
You position the content via the HTML it renders.
So you could place your ContentPlaceHolder within some HTML div or tables and position those, and that way assure that all content within the placeholder is positioned the same.
Re: How do you set the postion of a web page control?
Extremely helpful info. Thanks. :)
Re: How do you set the postion of a web page control?
Quote:
Originally Posted by
Mike Pliam
If one drags a control, say a button, from the Toolbox (VS 2008 - ASP.NET Website) to the default.aspx page in Design view, the button will always appear next to the last control entered, or if none has been entered, the upper left-hand corner of the page. Is there a way to manipulate this button to some absolute position on the page? The only properties I find in the button properties list is Height and Width. Perhaps a style sheet (*.css) is the way to set the button absolute position, but I can find no examples of such.
Please help. :)
hay,
actually there is another way to do that,
- using tables , i always do this,
- another thing is to use the formate from the VS menu in the design mode after inserting the control to the page, and then select the position then chose relative,
after this you can move it like the desktop applications