Posted by Beauregard T. Shagnasty on 07/16/06 14:05
Chris wrote:
> I want to have a printer friendly page. My code is all css based so
> changing the media type to 'print' in the style definition does what
> I want. So I would like JS that changes:
>
> <link rel="stylesheet" href="Footer.css" media="screen" />
>
> to
>
> <link rel="stylesheet" href="Footer.css" media="print" />
Why don't you just use two stylesheets? Put a call to both of them in
your pages.
<link rel="stylesheet" href="Footer.css" media="screen" />
<link rel="stylesheet" href="printing.css" media="print" />
Note different name. No JavaScript necessary.
Put all styles relating to printing in the print stylesheet.
See this site of mine, and do a print preview on any of the pages.
http://countryrode.com/
My client keeps a printed copy of
http://countryrode.com/sales/preowned.php
on the counter.
Here's the print stylesheet:
http://countryrode.com/style/crprint.css
--
-bts
-Warning: I brake for lawn deer
[Back to original message]
|