From John Tsevdos / @tsevdos
Question : why mobile first?
@media only screen and (min-width:480px) {
}
@media only screen and (min-width:768px) {
}
@media only screen and (min-width:1024px) {
}
@media only screen and (min-width:1200px) {
}
#container { width:100%; max-width:1200px; }
#main { float:left; width:75%; } /* 900 / 1200 */
#sidebar { float:right; width:25%; } /* 300 / 1200*/
#main { float:left; width:71.666666%; /* 860 / 1200 */padding:1.666666%; /* 20 / 1200 */ }
1em = 100% from 16px = 16px
1.5em = 150% from 16px = 24px
0.5em = 50% from 16px = 8px
img { max-width:100%; }
img, object, embed, video { max-width:100%; }
img { max-width:100%; height:auto !important; /* just in case, to force correct aspect ratio */ }
img { -ms-interpolation-mode: bicubic; } /* IE scaling fix */
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<a href="tel:+306948123456">+306948123456</a>
<a href="sms:+306948123456">+306948123456</a>
<link rel="apple-touch-icon" sizes="57x57" href="touch-icon-iphone-114.png" />
Easy mobile-friendly inputs
<!-- Default Keyboard -->
<input type="text" />
<!-- Numeric Keyboard -->
<input type="number" />
<!-- Pattern Keyboard -->
<input pattern="[0-9]*" type="text" />
<!-- Number Keyboard -->
<input type="tel" />
<!-- URL Keyboard -->
<input type="url" />
<!-- e-mail Keyboard -->
<input type="email" />