Msg#: 4389767 posted 10:36 am on Nov 22, 2011 (gmt 0)
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 ?
Msg#: 4389767 posted 11:13 pm on Nov 22, 2011 (gmt 0)
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.
Msg#: 4389767 posted 8:39 am on Nov 23, 2011 (gmt 0)
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...
Msg#: 4389767 posted 2:05 pm on Nov 23, 2011 (gmt 0)
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 !
Msg#: 4389767 posted 3:08 pm on Nov 23, 2011 (gmt 0)
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.