You are here: Re: Change media of stylesheet « HTML « IT news, forums, messages
Re: Change media of stylesheet

Posted by Bernhard Sturm on 07/16/06 13:30

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 would you want such a thing?
if your code is css-based, why not including the @media print {} in your
style-sheet(s)? using JS to switch between media-types seems a bit odd
(IMO).
media-type 'screen' is for screen, print will only be used for print as
being used by the users UA. so don't break the users UA :-)

bernhard

--
www.daszeichen.ch
remove nixspam to reply

 

Navigation:

[Reply to this 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

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