tags:

views:

80

answers:

4

I want to overide a style thats in a stylesheet on another server. However, I dodnt want to enter new values, I just want to cancel out that style somehow. Is that possible? The competing style is overiding some of my other styles and I just want to basically filter the remote style out.

+1  A: 

You can try setting it to auto or inherit and it might behave how you want. What is the property you are trying to change?

derrickp
+1  A: 

You can't.

Stylesheets cascade and there is no going back. Even the default value is just the value assigned to it in an internal browser stylesheet.

If you want to override something, you have to do so explicitly.

David Dorward
+1  A: 

I'd say you can do a couple things:
First you can define your selector as specific as possible, which means that if you are styling an element inside a table (or within any other element), make sure your selector includes the parent elements, as an example:

div#container div#navBar ul.navLinks li.link
{
    color:#000;
}

This will have precedence over something like:

li.link

or you can just add "!important" to the value and that will definitively override anything else, like this:

color:#000!important;

Hope it helps

jnkrois
A: 

you could do it in javascript:

// in the following, replace 1 with the index of the
// stylesheet you want to disable
var ss = document.styleSheets[1];
var rls = ss.cssRules ? ss.cssRules : ss.rules;
for(var i = 0; i < rls.length; i++){
    ss.deleteRule(i);
}

but read about cross browser css hell first

seanizer