|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
turning css styles off
I'm setting up a printer friendly page where all img tags, font tags, and things like that are being stripped.
I know I could just strip all instances of a class being called too, but is there some way to just turn a css stylesheet 'off'? So basically, when this printer friendly page is loaded, it would turn the stylesheet off so that all text is displayed as normal. I only have one stylesheet on the whole site, so i can call it specifically if I have to. Thanks for your help |
|
#2
|
||||
|
||||
|
<LINK rel="stylesheet" type="text/css" media="print" href="foo.css">
you can specify an own css file for the print. you don't even have to make an own priterfriendly page, just use the css to strip away the stuff you don't want. ie. removing all images img { display:none; } removing an menu. #menu { display:none; } http://www.w3.org/TR/REC-CSS2/media.html |
|
#3
|
|||
|
|||
|
You could do this:
Code:
<html>
<head>
<link rel=stylesheet type="text/css" href="styles.css" id=css>
</head>
<body>
<a href=# onClick="document.getElementById('css').href=''">CSS Off</a>
</body>
</html>
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > turning css styles off |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|