CSS code for web page and printing

by ArulKumar 2008-11-04 15:38:40

CSS document for printing

Normally most of the web pages doesn't have web pages for document printing. For those sites here is the code used to display fonds with CSS effects and printable friendly version.

There are two set of codes used to work it out, one for the screen and and one for printing:

Open a blank document and save it as printstyle.css. Next, point the screen CSS command to this document so that the command reads: <link type="text/css" rel="stylesheet" href="printstyle.css" media="screen"/>.


<link type="text/css" rel="stylesheet" href="stylesheet.css" media="screen"/>

<link type="text/css" rel="stylesheet" href="printstyle.css" media="print"/>

The first line of code calls up the CSS for the screen and the second line calls up the CSS for the printable version.


Tagged in:

991
like
0
dislike
0
mail
flag

You must LOGIN to add comments