Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE11 CSS alternative to "unset"

I have a fixed div on my page which is positioned with the following CSS properties:

width: 320px; height: 160px; position: fixed; right: 15px; bottom: 15px; top: unset; z-index: -1; 

The div appears fine in the bottom right of the page in other browsers, but in Internet Explorer 11 the div appears in the top right. I believe this issue is coming from top: unset; which doesnt appear to be supported in IE.

Are there any workarounds using CSS or JS that could be used to achieve the same positioning?

like image 681
Mike Avatar asked Jan 24 '18 14:01

Mike


People also ask

Does unset work in IE?

If the property is inherited, unset will act as inherit . If the property is not inherited, unset will act as initial . unset isn't hugely practical. It is not supported by several browsers, including Internet Explorer.

Can I use unset CSS?

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

What does the property value unset do?

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.


1 Answers

You are looking for top: auto, it seems.

like image 148
Bram Vanroy Avatar answered Sep 18 '22 16:09

Bram Vanroy