What are the largest valid px
values that CSS width
and height
properties accept?
(I'm currently building a webapp that creates a very large zoomable container element and I want to know what are the actual limits.)
What are the largest valid px
values that CSS width
and height
properties accept?
(I'm currently building a webapp that creates a very large zoomable container element and I want to know what are the actual limits.)
Using the CSS inspector that comes with certain browsers on an element with 10000000000px width and height:
Firefox: 33554400px
Chrome: 33554428px
Opera: 33554428px
IE 9: 21474836.47px
© 2022 - 2024 — McMap. All rights reserved.
"CSS theoretically supports infinite precision and infinite ranges for all value types; however in reality implementations have finite capacity. UAs should support reasonably useful ranges and precisions.
" - Section 4 in the Values and Units Module - So you'd have to figure it out for each browser. – Deflect