Click here to Skip to main content
13,447,245 members (38,291 online)
Rate this:
Please Sign up or sign in to vote.
See more:
how we can adjust web page size that might be fit to our web browser?
Posted 27-Nov-12 5:41am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You use CSS to create styles that can adjust to different resolutions. Tutorial[^]

If you need to be more dynamic than CSS can provide for you, you can also bring javascript into it. If you need to do that, I would suggest using jquery libraries as a lot of the cross-browser issues will already be dealt with.
faizanme 27-Nov-12 11:47am
thanks a lot marcus.
Sergey Alexandrovich Kryukov 27-Nov-12 12:46pm
This is one case where I'm not quite agree with you. Using CSS and jQuery are the good ideas (I voted 4), so what? The root of the problem is that the whole idea to control the page width is really bad; it's the content should be adaptive enough for all reasonable sizes. Please look at my answer to see what do I mean.
Marcus Kramer 27-Nov-12 13:30pm
The use of CSS and JQuery would be to not restrict the page dimensions but to provide a dynamic way of adapting the UI to the user's parameters.
Sergey Alexandrovich Kryukov 27-Nov-12 17:38pm
Right, but I wish you have said that in your answer.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I'm sure the attempt to adjust a page size is just a wrong idea. And, where the differences between layout engines come into play, you will never win the infinite race. :-)

Instead, you should better embrace the ideas of fluid, liquid and elastic designs:[^],[^],[^].

Please also see my past answers on related topics:
webpages layout change when running in different browsers.[^],
get screen width in php?[^].


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04-2016 | 2.8.180318.3 | Last Updated 27 Nov 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100