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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Page - Making it work with all resolutions... 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hello,

I would like to know the best practices to make our site work acceptably under all resoultions. Currently we seem to be going wrong here. The Pages have been designed for the 1024 X 800 resolution. When the Page is viewed under the 800 X 600 reslutions - it's all messed up.

We have used Layers (Div Tages) in the Page design. The coordinates of this are hardcoded in the code (in terms of pixels). This is where we think we are wrong.

Could anyone please let me know as to how we should handle this best. I am sure that we need to find out the resolution of the client browser and then make necessary changes.

Code sample will be highly useful. Any help would be appreciated.

Thanks & regards,

--Prakash--
 
Hi,

you cannot know from ASP the resolution of the user but you can do that with javascript

If you are going to stick to one design, then you should switch to tables and percentages not fixed.

ChouCh,
 
Prakash,

ChouCh is right, determining the user's screen resolution needs client side-scripting. you can use this javascript code if you like:

<script language=&quot;JavaScript&quot;>
// get user-computer info
var browserName = navigator.appName;
var browserVer = parseFloat(navigator.appVersion);
var height=screen.height;
var width=screen.width;

</script>

you can then send the variables to an asp page if u like or you can redirect the user to an appropriate page. Of course this approach implies that you make two versions of your page for both resolutions, which to tideuos to maintain.

If you dont want to do that, then keep in mind that when it comes to resolutions issues, layers are a very big no no. What do you need layers for anyway?

another thing you could do is import your graphic images (i assume that's what you put in your layers), into a flash file then lay it out in that file. images in a flash file dont get disarranged when changing resolutions.

hope this helps!

biggie


 
Best rule of thumb here is to just design for 800X600

Take this site, for instance...

If you do this, then 99.9% of your visitors will see the site as you intended, and you won't have to maintain two completely different sites.
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top