Skip to content

Glossary: CSS Layout and Responsive Design

aspect-ratio

Sets a box's shape as width divided by height, such as `4 / 3` or `1` for a square. Give the box a width and the browser works out the height.

Where the book teaches it

Related terms

object-fit