What is the Maximum Width of a Mobile Website?

by Geethalakshmi 2012-12-27 15:03:02

What is the Maximum Width of a Mobile Website?


You can define the media queries either in CSS or in HTML.

CSS

/* iphone */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
img { max-width: 100%; }
}

/* ipad */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
img { max-width: 100%; }
}


HTML

$lt;link rel="stylesheet" media="screen and max-width: 320px" href="mobi.css"$gt;


But, what Google recommends for use in smartphone is CSS.

Do not forget to test your mobile website in Google Chrome or Apple Mobile Safari.
900
like
0
dislike
0
mail
flag

You must LOGIN to add comments