We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE

The <ratio> CSS data type, used for describing aspect ratios in media queries, denotes the proportion between two unitless values.


The <ratio> data type consists of a strictly positive <integer> followed by a forward slash ('/', Unicode U+002F SOLIDUS) and a second strictly positive <integer>. Spaces before and after the slash are optional. The first number represents the width, while the second represents the height.


Use in a media query

@media screen and (min-aspect-ratio: 16/9) { ... }

Common aspect ratios

  Ratio Usage
Ratio4_3.png 4/3 Traditional TV format in the 20th century.
Ratio16_9.png 16/9 Modern "widescreen" TV format.
Ratio1_1.85.png 185/100 = 91/50
(non-integer dividends and divisors are not allowed)
The most common movie format since the 1960s.
Ratio1_2.39.png 239/100
(non-integer dividends and divisors are not allowed)
"Widescreen," anamorphic movie format.


Specification Status Comment
Media Queries
The definition of '<ratio>' in that specification.
Recommendation Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes Yes3.599.5 Yes
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes Yes Yes Yes Yes ?

See also

Document Tags and Contributors

 Contributors to this page: fscholz, mfluehr, Sebastianz, teoli, kscarfone, velvel53, Sheppy, FredB
 Last updated by: fscholz,