CSS aspect-ratio Calculator
Layoutaspect-ratio locks width and height together. Set 16 / 9 and the browser calculates height from width. No padding-top percentage trick or absolute positioning.
aspect-ratio browser support
Widely availableSince 202195% of people can use this
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2021.
Safe to use without fallbacks.