Reply to Re: Change media of stylesheet

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация