<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
css
@media screen and (max-width: 750px){
#yourid{
width: px;
}
.yourclass{
width: px;
}
}
@media screen and (min-width: 360px){
#yourid{
width: px;
}
.yourclass{
width: px;
}
}
@viewport{
zoom: 1.0;
width: device-width;
}
with javascript.
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
// some code..
var li = document.createElement('link');
li.type = 'text/css';
var href='mobile.css';
//var href=('https:' == document.location.protocol ? 'https://' : 'http://') +'thesite.com/api/widgets/pages.css';
li.setAttribute('href', href);
li.setAttribute('rel','stylesheet');
var s = document.getElementsByTagName('head')[0];
s.appendChild(li, s);
}