Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
how we can adjust web page size that might be fit to our web browser?
Posted 27-Nov-12 6:41am
Rate this: bad
good
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.
  Permalink  
v2
Comments
faizanme at 27-Nov-12 11:47am
   
thanks a lot marcus.
Sergey Alexandrovich Kryukov at 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.
--SA
Marcus Kramer at 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 at 27-Nov-12 17:38pm
   
Right, but I wish you have said that in your answer.
Cheers,
--SA
Rate this: bad
good
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. Smile | :)
 
Instead, you should better embrace the ideas of fluid, liquid and elastic designs:
http://speckyboy.com/2010/05/30/liquid-fluid-and-elastic-layout-templates-tools-and-frameworks/[^],
http://www.sitepoint.com/liquid-design/[^],
http://www.thesitewizard.com/webdesign/liquid-elastic-fixed-relative-layout.shtml[^].
 
Please also see my past answers on related topics:
webpages layout change when running in different browsers.[^],
get screen width in php?[^].
 
—SA
  Permalink  

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



Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 27 Nov 2012
Copyright © CodeProject, 1999-2014
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