Pixels can theoretically be used since they represent a fixed size (0.28mm, according to the
W3C9), but results will be far more consistent with everyday measurements.
CONTINGENCY PLANNING
265
11
9. If you really care about the physical width of a pixel, here is the link: www.w3.org/TR/REC-CSS2/
syndata.html#length-units.
Absolute units can be used for setting the dimensions of page elements. Consider the following
CSS file that is designed for printing:
#content {
width: 7.5in; color: #000;
}
#content h1 {
font: bold 12pt Helvetica, Arial, sans-serif;
}
#content p {
font: 8pt "Times New Roman", Georgia, serif;
}
By using these static units of measurement, the page will print nearly identically on lettersize
(8.5511 in.) paper across different systems. However, since there is no guarantee that
the person will be using letter-size paper, a smarter way of determining the printable area
is to set flexible padding around the body of the document, as shown in this example:
body {
padding: 10%;
}
#content h1 {
font: bold 12pt Helvetica, Arial, sans-serif;
}
#content p {
font: 8pt "Times New Roman", Georgia, serif;
}
This way, there will always be a healthy padding around the content, no matter what the
size of the paper.
Pages:
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519