C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

Relative positioning of controls in %?


Posted Date: 27 Aug 2008      Posted By: Swaminathan      Member Level: Gold     Points: 1   Responses: 3



I want to position all my tables in my master page as well as in child page in relative mode(viz.offset from normal flow) and also all values of tables including width and hieght in %.

In absolute position all my pages run perfectly. But in non standard monitor resolutions, white space comes in right side of every page.

To solve this issue, i got suggestion to use relative position and % for all values.

After changing position of all tables as relative and setting values(viz.height, width and position parameters) of all tables in %, white space doesn't come. viz. all tables get resized according to various resolutions.

Now still i have 2 issues.While using % for values,

1.All tables does not come in their respective positions in browser.(viz they come randomly)

2.Height and width of page could not be controlled.

Anyone who has suggestion or solution pls reply asap.

Thanks






Responses

Author: Karthikeyan S    27 Aug 2008Member Level: GoldRating: 3 out of 53 out of 53 out of 5     Points: 3

In the master page for Main table (Outer most table) use height and width = 100%.

But dont use %s for inner side tables or cells instead use 'Px' or 'Pt'.

Because you dont want white spaces in right most side, to fix this set the background of outer most table, so that user can feel that the page is of full screen. So, to make it visible full screen set width = 100%.

For inner tables and / or cells, you dont want to fill through out the screen because you have content/ controls of restricted sizes. So restict the table/ cells size using 'Px' or 'Pt' instead of '%' here. So your inner controls will be placed in the position as per your desire.

So, your outer page is filled with background color/image/border through out the screen while your controls size is at your desired postions/size.



Author: Swaminathan    30 Aug 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 5

I tried it viz. Outermost table width and height set to 100% and all inner table values are set in pixels.

Still in higher resolutions, all my controls does not get resized automatically and white space still comes in right most of page.

Do i have to set any border in outer table?. In design page right pane is set at the right most of outer table still in higher resolutions,
some space comes after the right pane.

Pls share your suggestions or solutions.

Thanks



Author: Swaminathan    01 Sep 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 4

Actually by setting values of all tables including inner
tables in %, in different resolutions tables get resized and
no white space comes.

Now only thing that i have to fix is despite setting the outer tables's
height and width as 100%, the length of page in browser comes too long.



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : How to encrypt and decrypt the password
Previous : what wrong in this procedure
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use