Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q5411 CSS style sheets and printing?

You are here: irt.org | FAQ | CSS | Q5411 [ previous next ]

While Style Sheets are great for screen presentation, you must practice caution when defining font sizes in pixels, if your site visitors frequently print out content from your site. You may define font sizes in "points" instead. By nature "pixels" are relevant to the output devices resolution, while points (pt) are device-independent measurements. For example, consider the following lines of code:

<style>
P {font-size: 72px}
</style>

On a printer with a 75dpi resolution, 72px is around 1 inch, at 150dpi--less than 1/2 inch, at 300dpi--less than 1/4 inch, and at 600dpi--less than 1/8 inch. To remedy this problem, use

<style>
P {font-size: 72pt}
</style>

Your printed font size will be 1 inch in all resolutions we described above.

©2018 Martin Webb