What is aspect-ratio in CSS?
The CSS aspect-ratio property sets a preferred width-to-height ratio for an element. It keeps proportions constant without resorting to the padding-bottom hack, and simplifies ratio handling for images, videos and responsive containers.



























































































































Unlimited requests, fast results
Submit as many briefs as you need. Our plans allow you to manage a continuous flow of design requests, without limits and without friction, and at an economic cost.
Syntax and behavior
aspect-ratio: 16 / 9; for widescreen, 1 / 1; for a square, 4 / 3; for the classic format. The property works on every element.
Use cases
Responsive image containers, loading placeholders, uniform card grids, and video embeds. Combined with object-fit: cover, you get perfectly framed images.



























































































































Unlimited requests, fast results
Submit as many briefs as you need. Our plans allow you to manage a continuous flow of design requests, without limits and without friction, and at an economic cost.
Conclusion
Aspect-ratio is a modern CSS property that eliminates the old hacks for maintaining proportions and guarantees consistent layouts on every screen.
Key takeaways
- Width-to-height ratio for any element
- Syntax: 16/9 (widescreen), 1/1 (square)
- Replaces the padding-bottom hack
- Combines with object-fit: cover
- Supported by every modern browser
Unlimited requests, fast results
Submit as many briefs as you like. Our plans let you manage a continuous flow of design requests, without limits or friction, and at an economical price.