Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Changing layout dynamically to fit screen
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Changing layout dynamically to fit screen

 Post Reply Post Reply
Author
Agni View Drop Down
Newbie
Newbie


Joined: 02 July 2004
Location: Greece
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Agni Quote  Post ReplyReply Direct Link To This Post Topic: Changing layout dynamically to fit screen
    Posted: 31 December 2004 at 4:23am
My main site page www.agni.gr fits fine on my screen (17''), but on my old work PC (15"") it does not fix. Of course I use tables for the layout (at 100%), but I would like to find the client screen resolution (I'm sure there is a server variable that I can access with asp) and if so, I could change the layout accordingly to fit.

Aynone had any success doing this?

Thanks

Nathan

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 31 December 2004 at 9:38am
The only way to do it in asp is
response.write(request.servervariables("http_ua_pixels"))
But it's only supported in one browser that I know of.
 
Another alternative is to use javascript in an entry page and redirect to aother page or set some session variables/cookies based upon screen resolution
document.write("screen width=" + screen.width + "<br>");
document.write("screen height=" + screen.height + "<br>");
document.write("available screen width=" + screen.availwidth + "<br>");
document.write("available screen height=" + screen.availheight + "<br>");
That won't work if they have javascript disabled.
 
Screen resolution as a key to site design is bogus to begin with. What makes you think I use my browser full screen? You need to be concerned with the size of the browser's viewport, not the size of the screen it's displayed on.
 
You're much better off to go with a fluid solution and allow the user to view your site with using their preferences - not yours. You also don't have to maintain different sites for different screen resolutions.
 
EDIT: Went to your site using fire fox set to different sizes - 800x600, 1024x768, and 1600x1200. Looks good in all sizes although there's some horizontal scrolling needed in 800x600. Expands well to full screen 1600x1200.


Edited by dpyers - 31 December 2004 at 9:44am

Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.