PDA

View Full Version : bypassing CSS definitions


jcbolt
01-27-2003, 11:09 PM
Is it possible to bypass style definitions contained in CSS, in a particular are of the html code?
I mean, I have a web page where I use CSS to define some standard styles. But, in a specified area of the code where I want to use different styles, I want to make the CSS definitions inactive. How can I do that?

Thank you

tempest1
01-28-2003, 12:41 AM
Well you can always set subclasses in your code. Like this


p{} //normal text
p:2{} //subclass text
this can be called on like <p class="2"> when you want to change classes to something else

CRASH_OVERRIDE
01-28-2003, 12:28 PM
Shouldnt the colon should be a decimal?:)

ronaldb66
01-28-2003, 12:54 PM
... point, that is, and yes; colons are for pseudo-classes. Moreover, a class name shouldn't begin with a numeric, but:
... in CSS1, selectors (element names, classes and IDs) can contain only the characters A-Z, 0-9, and Unicode characters 161-255, plus dash (-); they cannot start with a dash or a digit; they can also contain escaped characters and any Unicode character as a numeric code (see next item).
But i still feel the initial poster means something else.

meow
01-29-2003, 02:04 AM
Oi oi! I think you mean pseudo classes. You can't define your own. ;)
http://www.w3.org/TR/REC-CSS2/selector.html#pseudo-elements

There is no way to 'nullify' as declaration. You can override it with something else though.