Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS "unset" / "initial" in Internet Explorer

Is there anything similar to

background-color: unset; 

or

background-color: initial; 

that is supported in Internet Explorer?

(before thinking in using javascript)

like image 1000
Fernando Gabrieli Avatar asked May 21 '14 20:05

Fernando Gabrieli


People also ask

How do you unset a CSS attribute?

To unset the value of an element, unset keyword is used. The unset CSS keyword resets a property of an element to its inherited value if the property naturally inherits from its parent, or to its initial value if it does not inherit.

Can I use CSS unset?

unset can be applied to any CSS property, including the CSS shorthand property all .

What is initial and inherit in CSS?

inherit : Get the property from the parent element. initial : The default value for the property (the browser default). unset : Acts as either inherit or initial. It'll act as inherit if the parent has a value that matches, or else it will act as initial.


1 Answers

According to MDN, the initial value for background-color is background-color: transparent;. You could try to use that.

like image 99
Niek Avatar answered Sep 23 '22 14:09

Niek