homepage Welcome to WebmasterWorld Guest from 54.242.126.126
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
No-CSS Inheritance Area
Is it possible to avoid CSS style definitions being applied in region X
cosmoyoda

5+ Year Member



 
Msg#: 3818809 posted 9:13 am on Jan 4, 2009 (gmt 0)

Is it possible to have a certain region on your page, ex:

<div id="noCSS"
<h1>Heading 1</h1>
<h1>Heading 1</h1>
</div>

have no absolute influence over CSS style definitions I define on my CSS style sheet file? What I mean is that... let's use this example for simplicity's sake, if in my master_css_file.css I say that all "h1" tags need to be red, I'd like to know what could I do to make specifically all h1 tags inside that No-CSS zone to not change to red. Please note this is just one simple example, I want a general solution that would work for all tags.

I'd like to know if such feature is possible because I need to have a "No-CSS zone of my site" so that no matter what style definitions I enter on my master CSS file, nothing within that DIV will change. It will have normal default browser definitions just as if no CSS had being used in the first place.

I wish to do this so I can have more control over my CSS. You see, sometimes I have to use include('path/to/file.html'); in PHP and when including an HTML document (even if just what's inside the <body> tag), most of the content will not have preserved its original style definitions. So I am asking this question here to see if it would be possible for me to have more control over my CSS and avoid having these "included HTML files" so messed up by my own CSS master file.

 

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3818809 posted 11:19 am on Jan 4, 2009 (gmt 0)

you could probably only do that with an iframe. because the iframe would have its own stylesheet

the only way you do it otherwise would be to fake it -- by giving everything a style that looked like it was returning back to its default. something like this would work

#noCSS, #noCSS * { color:#000; background:#fff; border:none; etc etc... }

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved