Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q5411 CSS style sheets and printing?

irt.org | Knowledge Base | CSS | Q5411 [ previous next ]

Q5411 CSS style sheets and printing?

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.


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.