Availability: |
| |||
Property/method value type: | String primitive | |||
JavaScript syntax: | none | myStyle.size | ||
CSS syntax: | size: anAspect size: aSize anAspect size: aWidth aHeight anAspect | |||
Argument list: | aSize | When only one length value is specified, the page is square | ||
anAspect | An aspect ration control | |||
aWidth | A page width | |||
aHeight | A page height |
This is part of the printing control mechanism in the CSS level 2 specification.
It provides a way to set the page size and aspect ration of the printed output. This should not affect the display of the page on the screen.
There are three parameter values expected. The first two are numeric values describing the page size. These are expressed in measurement units. You can optionally only include one because the third parameter is a keyword. If you omit both of the numeric values, the page size is assumed to be that of the printer by default. If only one is specified, then a square printable area is defined. Two values control the page width and page height respectively.
Printers may apply a non-printable margin area to the page, and the value you specify here must fit within it otherwise the content may be cropped when it is printed.
The last parameter value is specified using one of the following keywords:
auto
portrait
landscape
See also: | STYLE.media, style.orphans, style.page, style.pageBreakAfter, style.widows |
Prev | Home | Next |
style.setExpression() | Up | style.speak |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |