@media only screen and (max-width: 999px) {
/* rules that only apply for canvases narrower than 1000px */
}
@media only screen and (device-width: 768px) and (orientation: landscape) {
/* rules for iPad in landscape orientation */
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* iPhone, Android rules here */
}
These might look proprietary but fact is these are CSS3 media queries implemented in Firefox, Safari (including Mobile) and Google Chrome.
After which, create three different layouts.
1.widths up to 480px (iPhone, Android): tight spacing, single-column;
2.up to 980px (iPad in portrait): fluid columns only on top section, single-column elsewhere;
3.wider than 980px: fixed, two-column centered layout.
You might also want to adjust your font size for each different styles to fit them perfectly for the targeted devices.
Also, if you are targeting the iOS platform, make sure your layout automatically fills the display of the iDevice. In mobile webkits, you might want to use this:
<meta name="viewport" content="initial-scale=1.0">
This is because mobile safari displays a zoomed out 980px wide version of the page even if the layout itself is narrower. You can read more of these specifications here: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html
You should be aware that orientation media query, although supported on the iPad, doesn’t work on the iPhone. Fortunately, size queries like width and device-width work, so layout-switching is possible without JavaScript with some combination of those.
Also, with the advent of Retina display devices, you might want to target them specifically to serve high-resolution graphics. You can check this out for details: https://webkit.org/blog/55/high-dpi-web-sites/
finally, for Retina devices, you may use this:
<link rel="stylesheet" media="only screen and -webkit-min-device-pixel-ratio: 2" href="highres.css">