Reputation: 1
I have designed a website site. I would like to know if it is possible to make pages in my site re-size to suite the visitors' monitor resolution.
For example, I'm using my computer with 1024x768 resolution. If I change my resolution to 800x600 I want my site to re-size to fit the screen resolution of 800x600.
Upvotes: 0
Views: 137
Reputation: 1430
this is some key word for what your search
css grid system responsive/adaptative web
some links
http://net.tutsplus.com/tutorials/design-tutorials/quick-tip-different-layouts-for-different-widths/
http://speakerdeck.com/u/nathansmith/p/960-grid-system
http://www.emblematiq.com/lab/my-adaptive-grid/
http://webdesignledger.com/resources/responsive-web-design-templates-and-frameworks
Upvotes: 0
Reputation: 11546
You don't want the resolution, since not everybody uses their browser fullscreen; you want the document size. There are ways to get that in plain javascript, but your best bet is to use a library like jquery, since that helps ensure your technique works cross-browser:
But don't do that unless there is no other way to do what you want; first try using percentages in your CSS. Setting sizes with js is messy.
Upvotes: 0
Reputation: 6258
This is called "dynamic" or "fluid" width, as opposed to setting a "fixed" width on the page. This is usually done with CSS, as opposed to PHP or JavaScript. Do some research on the subject on Google (search for "dynamic width web pages"). I found this article.
Upvotes: 0
Reputation: 219834
Yes, it's called responsive design. Specifically look at media queries.
Upvotes: 2