CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 3rd, 2003, 10:17 AM
Mystic511 Mystic511 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 18 Mystic511 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old December 3rd, 2003, 12:11 PM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,620 Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 1 h 17 m 41 sec
Reputation Power: 532
<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

Reply With Quote
  #3  
Old December 3rd, 2003, 12:36 PM
Winters Winters is offline
Bad Coder
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jul 2003
Posts: 1,742 Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 10 h 57 m 14 sec
Reputation Power: 171
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>

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > turning css styles off


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway