CSS Media Queries facilitate the content and style separation approach across a range of web-enabled devices.
An introductory article explaining the benefits of the ProtoFluid method is now available via this Menacing Cloud article.
All media query options are covered in detail by the W3C CSS3 Media Query specification document.
<link href='css/480.css' media='only screen and (max-width: 480px), only screen and (max-device-width: 480px)'
rel='stylesheet' type='text/css'>
@media only screen and (max-width: 480px), only screen and (max-device-width: 480px) {
body { background: pink; }
}
These examples will allow targeted styling for the iPhone and prototyping in ProtoFluid for iPhone sized devices.
More and more devices are supporting the ‘orientation’ CSS Media Query. This allows for content styling targeted for portrait or landscape viewing.
@media all and (orientation: portrait) { ... }
@media all and (orientation: landscape) { ... }
Be aware that the ‘orientation’ Media Query is not supported on iPhone yet!. It is supported on the iPad (neat article here) so is likely to hit the iPhone soon.