Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello all,
I build a website for mobile, and I want to autoresize all when change the orientation...

My meta tag:
HTML
<meta name="viewport" content="width=device-width, user-scalable=no"/>

I habe already tried with math, modifyingg "initial-scale" in the meta tag with JS, I spend some hours with math, but... I FAIL!

So I tried with a simple "throttledresize":

JavaScript
$(window).bind('orientationchange', function(event) {
  $(window).trigger("throttledresize");
}


And its working well, yeahh!!! :D
But.. its working well on iPhone, on android NOOO... on android its only good at "landscape" mode, in "portrait" mode it is NOT!!!

I have done my CSS in PX and not in PERCENTAGE, because the images are incorrect for percentage use, the designers are stupid I know...

Please help me...
Regards,
KZ
Posted

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900