Re: Change media of style***



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="style***" href="Footer.css" media="screen" />

to

<link rel="style***" 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="style***" href="Footer.css" media="screen" />
<link rel="style***" href="printing.css" media="print" />

Note different name. No JavaScript necessary.
Put all styles relating to printing in the print style***.
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 style***:
http://countryrode.com/style/crprint.css

--
-bts
-Warning: I brake for lawn deer
.


Quantcast