css - Responsive issue: Responsive is not working properly in iphone -


after completing responsive @media screen , (max-width:320px){ code } , @media screen , (max-width:480px){ code } iphone portrait , landscape, design works in pc browsers design seems small 320px showing 160 left screen of iphone portrait.

add following meta tag in head tag

<meta name="viewport" content="width=device-width, initial-scale=1.0"> 

and more thing internet explorer 8 or older doesn't support media query. can use media-queries.js or respond.js add media query support in ie.

<!--[if lt ie 9]>     <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script> <![endif]--> 

Comments