Click here to Skip to main content
16,012,168 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: BgColor in aspx Pin
Enrico Elizar Samuel10-Sep-02 18:45
Enrico Elizar Samuel10-Sep-02 18:45 
GeneralPermission/security with ASP Pin
Barry Lapthorn8-Sep-02 5:07
protectorBarry Lapthorn8-Sep-02 5:07 
GeneralRe: Permission/security with ASP Pin
Enrico Elizar Samuel10-Sep-02 19:03
Enrico Elizar Samuel10-Sep-02 19:03 
GeneralRe: Permission/security with ASP Pin
Barry Lapthorn10-Sep-02 22:05
protectorBarry Lapthorn10-Sep-02 22:05 
GeneralPosition od controls Pin
Mazdak7-Sep-02 2:19
Mazdak7-Sep-02 2:19 
GeneralRe: Position od controls Pin
Paul Watson7-Sep-02 4:21
sitebuilderPaul Watson7-Sep-02 4:21 
GeneralRe: Position od controls Pin
Mazdak7-Sep-02 4:24
Mazdak7-Sep-02 4:24 
GeneralRe: Position od controls Pin
Paul Watson7-Sep-02 4:41
sitebuilderPaul Watson7-Sep-02 4:41 
Mazdak wrote:
Paul Watson wrote:
Do you mean the visual position of the HTML elements on the page?
Yes.


Ok couple of things (sorry if you know some of this, just going over it to make sure.)

HTML element positioning is not like a Windows app where you can just set the left and top and have it sit wherever you want. By default it is in "flow" mode where each element flows on from the last.

You can however absolutely position elements by using CSS, so overriding the flow behavouir. When you do this to an element it is taken out of the flow of the document and other elements which are not absolutely positioned will act as if that absolute element does not exist when determining their position.

To get an element to position on a left and top basis you need the following CSS styling applied to it: style="position: absolute; top: 100px; left: 100px;"

Also remember that there is a distinct Server side and Client side to a web app. So you cannot have a for loop in the onload event of your ASPX page which moves an element across the page, it won't work as at that point the HTML has not been sent back to the client. You have to use JavaScript on the client-side to do that (or SVG, SMIL etc., but still all on the client-side.)

Of course in your ASPX onload event you can position a control and that position will be displayed to the client. e.g. Label1.top = 20; Label1.left = 20;

In most cases using the CSS method is best and the easiest (and remember rather use a CSS external file rather than the inline style I showed.) However if you need some calculations to determine the position then you can use JavaScript on the client-side or whatever ASP.NET language you choose on the server-side.

If none of the above is what you are looking for, post your code and what you want to do and I can help more Smile | :)

Paul Watson
Bluegrass
Cape Town, South Africa

GeneralRe: Position od controls Pin
Mazdak7-Sep-02 5:25
Mazdak7-Sep-02 5:25 
GeneralRequest params in ASP.NET Pin
Mazdak6-Sep-02 23:28
Mazdak6-Sep-02 23:28 
GeneralRe: Request params in ASP.NET Pin
Mazdak6-Sep-02 23:41
Mazdak6-Sep-02 23:41 
GeneralPage_Load Pin
Mazdak6-Sep-02 7:45
Mazdak6-Sep-02 7:45 
GeneralRe: Page_Load Pin
Not Active6-Sep-02 8:32
mentorNot Active6-Sep-02 8:32 
GeneralRe: Page_Load Pin
Mazdak6-Sep-02 23:36
Mazdak6-Sep-02 23:36 
GeneralRe: Page_Load Pin
Not Active7-Sep-02 2:50
mentorNot Active7-Sep-02 2:50 
GeneralRe: Page_Load Pin
Mazdak7-Sep-02 4:26
Mazdak7-Sep-02 4:26 
GeneralRe: Page_Load Pin
Paul Riley6-Sep-02 9:33
Paul Riley6-Sep-02 9:33 
GeneralRe: Page_Load Pin
Paul Riley7-Sep-02 2:20
Paul Riley7-Sep-02 2:20 
GeneralHTML Help WorkShop problem Pin
Black ghost6-Sep-02 3:58
Black ghost6-Sep-02 3:58 
GeneralRe: HTML Help WorkShop problem Pin
Philip Patrick10-Sep-02 22:59
professionalPhilip Patrick10-Sep-02 22:59 
GeneralDataGrid subclass with auto-filter functionality Pin
D.D. de Kerf6-Sep-02 3:27
D.D. de Kerf6-Sep-02 3:27 
GeneralStop and Start Web Server running COM Component Pin
Kevin McFarlane6-Sep-02 1:52
Kevin McFarlane6-Sep-02 1:52 
GeneralRe: Stop and Start Web Server running COM Component Pin
jungle10-Sep-02 3:22
jungle10-Sep-02 3:22 
GeneralAdding tree control to a web form (ASP.NET) Pin
Kareemsoom5-Sep-02 1:30
Kareemsoom5-Sep-02 1:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.