Hi everybody. I have to resize my site depending on the current resolution of the window. On the web I only find scripts (js, php and so on) that allow you to resize an image. But I want to resize THE ENTIRE PAGE , including <img> <p> <a> and all the textes. How can I do this ?
Not sure what you're asking. Do you want the text areas to get proportionally larger or smaller? That should happen automatically unless you've overconstrained everything.
Do you want images to resize? This is tricky bordering on risky. Some browsers simply aren't very good at it. Making an image larger than its original size rarely comes out well. Making the image significantly smaller means that the user has wasted time downloading more material than they need.
Hi I know that is a bad idea resizing the site, but I depend on the ideas of a team of graphics, so... I have to obey :) What I want is to rescale the ENTIRE site, so it isn't enough using relative units, beacuse I want to scale even text size...
Yeah I know... But what can I do... graphics are graphics and think only about appearance... And I'm a junior web-developer, so everything I say is not completely considered :( Ok, now I try to set all the dimensions (even of the fonts) in relative units... Thanks !
There's a classic article regarding resolution dependent layout here [themaninblue.com] (and an updated demo here [themaninblue.com]).
The gist is that you have separate stylesheets and just swap out which stylesheet is active by detecting the window onresize event. Gmail currently employs this kind of strategy to adjust the vertical padding of email entries in your inbox based on how tall your window is.