| ~Wildfire: > Articles > Designing & CSS for Print (Optimising your Pages When they are Printed) | |
| ~Look at: | Articles | FAQs | Resources | Reference | | |
|
It's difficult enough designing for various browsers with different levels of standards compliance, but many webmasters often overlook the need for print versions of their standard pages. How can you design for pages that need to be printed and what options are there for coding for printing?
Designing For PrintThere are two options when creating a web site with documents that may need to be printed. You can either design all the web pages to be suited to print as well as the web, or you can maintain two copies of the same document, one with the branding and features that may be useful on the web, and one which has many features stripped down. When designing your web pages for printing you may want to consider the following points:
CSS Options for PrintAlthough HTML has no real supported features to enable optimisation when printed CSS does. It allows you to specify a specific style sheet to apply to the document when it is being printed. This is done within the <LINK> or <STYLE> tag depending on which method you are using to integrate CSS into your site.
<LINK REL="StyleSheet" TYPE="text/css" HREF="style.css"
MEDIA="print">
The above code is placed in the <HEAD> section of the document. It specifies a style sheet to be applied to the document when printing. It has no effect on the online-presentation of the page. Now if you are using the <STYLE> tag on each page to do your CSS then the code that you want is very similar.
<STYLE MEDIA="print" TYPE="text/css">
P {color:black;} </STYLE> It is the MEDIA attribute here also that specifies that the styles are for the print medium. Hopfully you can take note of the points above and provide your users with a print version of your pages. |
| Top of Page | |
| ~Look at: | Articles | FAQs | Resources | Reference | | |
| © Jamie McHale 1998 - 2000 - http://www.btinternet.com/~wildfire/ |