Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the maximum pixel value of CSS width and height properties?

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.)

like image 366
sbichenko Avatar asked May 19 '13 17:05

sbichenko


People also ask

What is max height and max-width in CSS?

The CSS height and width properties are used to set the height and width of an element. The CSS max-width property is used to set the maximum width of an element. This element has a height of 50 pixels and a width of 100%.

What is Max-width in CSS?

Definition and Usage. The max-width property defines the maximum width of an element. If the content is larger than the maximum width, it will automatically change the height of the element. If the content is smaller than the maximum width, the max-width property has no effect.

Is there a max height in CSS?

The max-height property in CSS is used to set the maximum height of a specified element. Authors may use any of the length values as long as they are a positive value. max-height overrides height, but min-height always overrides max-height .

How big is a pixel in CSS?

The term CSS pixel is synonymous with the CSS unit of absolute length px — which is normatively defined as being exactly 1/96th of 1 inch.


1 Answers

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 
like image 144
James Donnelly Avatar answered Sep 23 '22 07:09

James Donnelly