I am looking for a way to hide div in IE11 and lower, but still have it display in Edge and other browsers.
Is it best to hide elements like this using Javascript?
Any direction would be appreciated.
I am looking for a way to hide div in IE11 and lower, but still have it display in Edge and other browsers.
Is it best to hide elements like this using Javascript?
Any direction would be appreciated.
IE8-11:
@media screen\0 {
body { display: none };
}
IE <= 8:
@media \0screen\,screen\9 { body { display: none } }
Detecting IE11 using CSS Capability/Feature Detection
@JanKyuPeblik:
This works because IE11 doesn't actually even support
@supports
, and all other relevant browser/version combinations do.
body { display:none }
/**/@supports not (old: ie) {
body { display:unset }
/**/}