Is there a way to block css being used for a certain part of html on a page.
mary
| SitePoint Sponsor |
Is there a way to block css being used for a certain part of html on a page.
mary

Use a DIV:
<div id="whatever">
Put content here.
</div>
John Conde | Facebook | Twitter
Brainyminds Merchant Account Services I Love Code eBook Giant
Authorize.Net: AIM API | ARB API | CIM API Get the FREE code!
Merchant Accounts 101 | Ecommerce 101

I'd love to know what the question actually means ;-)
Nadia
Unique CSS Templates by Nadia
Dreamweaver: Tutorials.Templates.CSS Designs
SitePoint Books |My Fireworks Tutorials 1 2
Follow me on Twitter | Community Team Advisor


Hi Mary, and welcome to SitePoint!
No, there is no way to block or disable CSS for parts of a page. There are two ways to work around it, though:
- Enclose the part in a DIV with an id attribute, as stymiee said. Then apply CSS rules to it that cancels the rules you wish not to apply.
- Use classes and IDs for everything but the special part, and apply CSS rules only to those classes and IDs.
Birnam wood is come to Dunsinane
Yea, or if you applied body styles in css, put the stuff you don't want formatted in css in a special div, which you choose the defaults or the look of that div.
HTMLGuy
Thanks for your reply. And Thanks to all other replies.
Is there an easy way to set css defaults or do you have to list all attributes and set them.
mary
Originally Posted by htmlguy
Thank you
mary
Originally Posted by AutisticCuckoo
Well for browser defaults just do this:
body (or #divid) {
}
Basically that makes no changes to the default of the body, or the browser.
HTMLGuy


There is no easy way to 'undo' CSS set by another rule, unfortunately.Originally Posted by catchit2000
Off Topic:
BTW, it's called properties, not 'attributes' in CSS.
Birnam wood is come to Dunsinane
Bookmarks