CSS code for web page and printing - CSS Views : 991
Tagged in : CSS
Send mail vote down 0 vote down 0
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.


By - ArulKumar, On - 2008-11-04




    Login to add Comments .