WEB DESIGN TRENDS / 18 OF 20
Container Queries
Container queries let a component respond to the width of its own parent instead of the viewport. The source example resizes a product card and changes its layout at 300, 440, and 640 pixels.
DESCRIPTION & USE
How the trend works
Container queries let a component respond to the width of its own parent instead of the viewport. The source example resizes a product card and changes its layout at 300, 440, and 640 pixels.
Where to use it
Use them for reusable cards and widgets that appear in different page regions. Viewport media queries still work well for overall page composition.
Bootstrap provides containers, columns, and cards for the outer layout. Container-type and CSS container rules are native features rather than Bootstrap classes.
Useful classes.container, .row, .col-*, .card, .d-flex, .gap-*, .form-rangeFROM THE ATTACHED HTML
The original example
Orbit 3D
The card switches from stacked to side-by-side as its container grows.
A PRACTICAL EXTENSION