I'm wondering what the correct way to reset/unset the CSS behavior
property is for IE.
div { behavior:url(fixIE.htc); }
I need to reset this for some specific elements. I started searching for the answer after I noticed that this does not work:
.my-div { behavior:0; }
I found an SO post that says an empty string worked, but there's no reference cited that this is in fact the correct way to do it:
.my-div { behavior:''; }
However, I've seen this used in some code I've come across:
.my-div { behavior:none; }
I cannot find any actual reference as it's not really in the spec, the closest thing I found was here:
http://reference.sitepoint.com/css/behavior
...but it doesn't clarify the issue.
Which way is correct, or does it not matter (consider javascript interaction as well, if it makes any difference)? Please include a reference if it exists - that's what I'm really looking for.
The unset CSS keyword resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.
unset. Changes all the properties applied to the element or the element's parent to their parent value if they are inheritable or to their initial value if not. ❮ Previous Complete CSS Reference ❯
Use the style. removeProperty() method to remove CSS style properties from an element, e.g. box. style. removeProperty('background-color') .
You can check it at the w3c documentation here. As it says, the initial value is none
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With