concept medium query in category css

appears as: media queries, media query, The media query, media query
CSS in Depth

This is an excerpt from Manning's book CSS in Depth.

Let’s take this a bit further. You can use some media queries to change the base font size, depending on the screen size. This’ll make the panel render at different sizes based on the size of the user’s screen (shown in figure 2.8).

Figure 2.8. Responsive panel on different screen sizes: 300 px (top left), 800 px (top right), and 1,440 px (bottom)

media query—An @media rule used to specify styles that will be applied only to certain screen sizes or media types (for example, print or screen). This is a key component of responsive design. See listing 2.15 for an example; I’ll cover this in greater depth in chapter 8.

  • The @media at-rule. With this rule, you can tailor your styles for viewports of different sizes. This syntax (often called media queries) lets you write styles that only apply under certain conditions.
  • 8.2.1. Understanding types of media query

    You can further refine a media query by joining the two clauses with the keyword and: