Chapter 2. Media Queries – Supporting Differing Viewports
In the previous chapter, we had a brief look at the essential components for a responsive web page: a fluid layout, fluid images, and media queries.
This chapter will look in detail at media queries, hopefully providing all that's needed to fully understand their capability, syntax, and future development.
In this chapter, we shall:
- Learn why media queries are needed for a responsive web design
- Understand the media query syntax
- Learn how to use media queries in
linktags, with CSS
@importstatements and within CSS files themselves
- Understand what device features we can test for
- Use media queries to facilitate visual changes dependent upon available screen space
- Consider whether media queries should ...