The correct meta viewport syntax
It's not uncommon to come across two slight variations on the syntax for declaring meta viewport content values. It should be noted that only one is correct, and using an incorrect syntax can actually create problems in certain web browsers.
This is the correct syntax:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
This is the incorrect syntax:
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
Notice the correct syntax uses comma separated values. The incorrect way is to use a semi-colon as separators.
For more info on this go to: (http://dev.w3.org/csswg/css-device-adapt/)
Written by Mike
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Viewport
Authors
benjamincharity
1.172K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#