navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Disable CSS on Certain Pages

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> Disable CSS on Certain Pages
Page: [1]
 
Mick Dugan

 

Posts: 26
Joined: 7/26/2003
Status: offline

 
Disable CSS on Certain Pages - 3/10/2007 8:26:28   
Hi All,

I'm using CSS to display my logo on the top of each page, but there are some pages where I'd prefer not to display it at all. Is there a way to do this, or is this an "all or nothing" situation?
jurgen

 

Posts: 385
Joined: 1/9/2007
From: Castle Rock, Colorado
Status: offline

 
RE: Disable CSS on Certain Pages - 3/10/2007 9:26:39   
You could split your style sheet and make 2 css files. One "main.css" and one "logo.css". When you want to show the logo just link both files in your header. Otherwise leave it out.

(in reply to Mick Dugan)
Tailslide

 

Posts: 6050
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Disable CSS on Certain Pages - 3/10/2007 10:29:01   
Might be easier to give your logo a class such as "noshow" on the pages you don't want it seen on then add a rule to the stylesheet:

img.noshow {display:none;}


If you remove the stylesheet from the page all together you'll lose the rules for the rest of the page.

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to jurgen)
Donkey

 

Posts: 3869
Joined: 11/13/2001
From: Blackfield United Kingdom
Status: offline

 
RE: Disable CSS on Certain Pages - 3/11/2007 20:29:11   
My first reaction is why not just leave it out of the html on those pages? If it is not in the html but is called in as a background image to the body or a container div then just take Helana's "noshow" idea and create a
body#noshow
without the background image and for the pages where you don't want the logo in the html replace <body> with <body id="noshow">

_____________________________

:)

I have a higher and grander standard of principle than George Washington. He could not lie; I can, but I won't.
Samuel Clemens

(in reply to Tailslide)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> Disable CSS on Certain Pages
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts