Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Phone viewport meta tag

I'm currently working on a mobile website. Everything is working fine on both iOS and Android, i'm however experiencing problems with the viewport meta tag on Windows Phone when trying to set the width of the viewport to 640px. I'm using :

<meta name="viewport" content="width=640,user-scalable=no"/>

However it seems that whenever you are trying to set a viewport greater that 480px Windows phone automatically applies to default viewport (1024px).

Any Workaround ?

like image 313
Thomas Eschemann Avatar asked Feb 10 '12 23:02

Thomas Eschemann


1 Answers

I haven't had much success with <meta name="viewport"> and Windows Phone 7.5 unless I set width between 320 to 480 (inclusive). If I want to set it outside of that range it seems to just default to 320.

I tried just using <meta name="MobileOptimized" content="640"> and that worked perfectly. It behaves like <meta name="viewport" content="width=640,user-scalable=no">.

According to this article and the article linked to by in Mikael Koskinen's Answer the range should be 320 to 10,000 but I haven't been able to reproduce that.

like image 161
9 revs Avatar answered Oct 11 '22 19:10

9 revs