liveBook · Manning

Min-width

As explained in Web Design Playground, Second Edition

The min-width media feature tests whether the viewport or rendering surface is at least a specified width.

min-width checks whether the screen is at least a specified width. Inside a media query, a true test applies the styles; a false test leaves them alone. This is one of the handy switches behind an adaptive layout. section 14.4

Show an aside on wider screens

Use min-width when a style belongs on screens 1,024 pixels wide or wider. Tiny screens can skip the aside styling without drama. section 14.4

@media (min-width: 1024px) {
    aside {
        display: inline-block;
    }
}

This media query applies display: inline-block to aside when the screen width is at least 1,024 pixels. section 14.4

How Web Design Playground, Second Edition covers it

How deep it goes
Defines the threshold test and demonstrates media-query syntax, while deferring other media features to further reference material.
Examples
Shows an aside becoming inline-block at 1,024 pixels or wider.
What you can do after
Apply min-width through CSS media queries to change layouts at chosen screen-width thresholds.
How it connects
Connects min-width with media queries, adaptive layouts, max-width, and screen width.

Also explained in

Compare how 2 books explain min-width →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Web Design Playground, Second Edition. The section links point to the parts of the book it draws on.