Website not responsive on Samsung Galaxy S2
As i have found that samsung screen is 480*800px
Please try with below CSS:
@media only screen and (min-device-width : 480px) and (max-device-width : 800px) and (orientation : landscape) {}@media only screen and (min-device-width : 480px) and (max-device-width : 800px) and (orientation : portrait) {}
Thanks
try using this
<meta content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" name="viewport">
It is not recommended that you use @media rules, since the pixel size on a mobile device vs desktop may vary.
For instance, instead of:
@media only screen and (min-device-width : 480px) and (max-device-width : 800px) and (orientation : landscape) {}@media only screen and (min-device-width : 480px) and (max-device-width : 800px) and (orientation : portrait) {}
Add a container that will have a margin-left of 5% and margin-right of 5%:
<body><div class="container"># Your body goes here</div></body>
I have found this a much more user friendly and maintained approach to responsive design than the standard @media rule.