CSS size Property
Description
The size
property specifies the target size and orientation of the page box's containing block. In the general case, where one page box is rendered onto one page sheet, the 'size' property also indicates the size of the destination page sheet.
The size property has been deprecated or is no longer in any CSS working groups.
- Initial value
- auto
- Applies to
- Page content
- Inherited
- N/A
- Computed value
- Specified value
- Animatable
- No
- JavaScript syntax
- object.style.size
Syntax
size: <length>{1,2} | auto | [ <page-size> || [ portrait | landscape] ]
Values
- <length>The page box will be set to the given absolute dimension(s). If only one length value is specified, it sets both the width and height of the page box (i.e., the box is a square). If two length values are specified, the first establishes the page box width, and the second the page box height.
- autoThe page box will be set to a size and orientation chosen by the browser.
- lt;page-size>A page size can be specified using one of the following media names: A5, A4, A3, B5, B4, letter, legal and ledger
- portraitSpecifies that the page's content be printed in portrait orientation.
- landscapeSpecifies that the page's content be printed in landscape orientation.
Example
.class {
size: 25px 54px;
}
Browser Support
The following table will show you the current browser support for the CSS size
property.
Desktop | |||||
![]() |
![]() |
![]() |
![]() |
![]() |
|
? | ? | ? | ? | ? |
Tablets / Mobile | |||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
? | ? | ? | ? | ? | ? |