Responsive Web Design with CSS3
Join the DZone community and get the full member experience.
Join For FreeYou've probably heard of responsive web design, maybe even read the term-coining article or seen some working examples.
JavaScript can detect and respond to browser and platform features and limitations -- but the rise of mobile/tablet devices has meant that irreconcilable differences in browser and display capabilities run deep enough for a standard, not an application, to handle them.
CSS3 media queries, which detect and respond to browser properties, address these differences immediately. They aren't the only CSS3 feature that should prove useful to responsive web designers, though.
Katrien De Graeve points out that at least three features are necessary for good responsive web design:
- Media queries and media query listeners
- A flexible grid-based layout that uses relative sizing
- Flexible images and media, through dynamic resizing or CSS
And CSS3 can handle all of these.
Katrien's full article is an excellent short intro to responsive web design using CSS3, including a few polyfill options for legacy browsers. Read the rest, or check out a larger list of responsive design tools (not all of which use CSS3) if you're already familiar with media queries and flexible grids.
Opinions expressed by DZone contributors are their own.
Comments