CSS SIZE

This property describes the orientation or dimensions of the page box. The ‘size’ property classifies a page box so that it is either ‘relative’ or ‘absolute’. ‘Absolute’ page boxes have a fixed size, whereas ‘relative’ page boxes will be scaled to fit the target paged media. In the case where a page box is smaller than the intended ‘size’, CSS2 recommends that it be centered on the page to allow for better alignment of multiple pages.

Example
1
2
3
body {
  size: 8.5in 11in
}
1
2
3
<body style="size: 8.5in 11in">
  test text in the body
</body>

Possible Values

inherit: Explicitly sets the value of this property to that of the parent.
auto: This value defines a ‘relative’ page box, setting the values to the size and orientation of the target page.

portrait: This value defines a ‘relative’ page box, overriding the target page’s current default content orientation, using the typical paradigm where content flows from left to right across the short dimension, and flowing down along the long dimension.

landscape: This value defines a ‘relative’ page box, overriding the target page’s current default content orientation, using the landscape method, where content flows from left to right across the long dimension, and flowing down along the short dimension. This method is often used when a given line will contain larger amounts of content than normal.

[length]:: Giving length values for this property creates a page box with fixed dimensions, eg: an ‘absolute’ page box. Setting only one length value with this value creates a square page box of equal height and width. If two values are specified, the first value represents the page width, and the second represents the page height.