Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mislz28/public_html/wp-content/themes/css-faq-v2/timeweather/timeweather.php on line 19

For people looking for documents online who would like to secure hard copies of these documents for future use, they would definitely appreciate a page even more if the page has a “printer-friendly” feature. This feature allows users to view and then print a document without the unnecessary details that will be included if you were to copy and paste the page itself. CSS allows you to influence the appearance of a page when users click on the printer-friendly version of your document. It will usually appears like your average Word document if you are using Windows.

Use @media rule to specify different style for different media. You can define different rules for screen and a printer using this rule.
The example below specifies different font families for screen and print. Next CSS uses the same font size for both screen as well as printer.

<style tyle=”text/css”>
<!–
@media screen
{
p.bodyText {font-family:verdana, arial, sans-serif;}
}
@media print
{
p.bodyText {font-family:georgia, times, serif;}
}
@media screen, print
{
p.bodyText {font-size:10pt}
}
–>
</style>

If you are defining your style sheet in a separate file then you can also use the media attribute when linking to an external style sheet:

<link rel=”stylesheet” type=”text/css”

media=”print” href=”mystyle.css” mce_href=”mystyle.css”>

Including “printer-friendly” feature increases your site’s usability as this tends to lessen your users difficulty when they want to come up with a printable copy of content.

You can visit http://www.cssdog.com/css_printing.html for other articles on CSS.

Tags:

This entry was posted on 16 March 2008 at 11:26 PM and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One comment

1. 

[...] even more if the page has a “printer-friendly” feature. This feature allows users to … MORE >>Creadit By Fat [...]

16 March 2008 at 11:29 PM

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment