HTML & CSS
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0" />
p.376, Sitepoint, css3 4e
what do? is really needed?
This whole meta tag is valid today or somewhat modified?
I typically just use this:
<meta name="viewport" content="width=device-width">
Basically, it forces mobile browsers to display the website at their native resolution, rather than allow the site to spill outside of the viewing area of the screen, requiring the user to scroll and zoom.
Support for target-densitydpi is being withdrawn so should not really be used.
Some useful info here.
, maximum-scale=1 // this is for hybrid apps no zoom in, but not for web-apps that need scale if required? correct?
You should use: <meta name="viewport" content="width=device-width, initial-scale=1"> which will allow the user to zoom if required as maximum-scale=1 will stop pinch and zooming.
Please don't ever stop pinch and zoom. Without I can't read most things comfortably.
viewport meta tag is only for HTML5 web pages?
No, its valid for html4/xhtml also.
This topic is now closed. New replies are no longer allowed.