I currently have following width specific media query.
@media only screen and (max-width: 1920px) {
.toggleMultiSelect .filter {
width: 566px;
}
}
But the width for '.toggleMultiSelect .filter' changes in IE from Chrome/Firefox. So basically need to apply different width for the same css class in 1920px for IE. From the Stackoverflow search I found that IE specific behavior can be achieved like below.
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.toggleMultiSelect .filter {
width: 575px;
}
}
So now I need to achieve both resolution and css class. 575px width only should apply to IE and Chrome or firefox should get 566px.
Thanks in advance for any help.
If you want to include both min and max width for responsiveness in the browser, then you can use the following: @media (min-width: 768px) and (max-width: 992px){...} @media (min-width: 480px) and (max-width: 767px) {...}
Setting a particular "width-range" isn't any different from the way media queries are created. The only difference is the addition of more media feature expressions (that is, the screen width sizes). Take a look: @media only screen and (min-width: 360px) and (max-width: 768px) { // do something in this width range. }
The @media rule is used in media queries to apply different styles for different media types/devices. Media queries can be used to check many things, such as: width and height of the viewport. width and height of the device.
Media Queries SupportCSS Media queries are supported in Internet Explorer (IE) 9+, Firefox 3.5+, Safari 3+, Opera 7+, as well as on smartphones and other screen-based devices. Although older versions of IE don't support media queries, still there is a way you can make it work.
Use the below css inside the media query
IE 10 and above
_:-ms-lang(x), .ie10up {
property:value;
}
IE 11 and above
_:-ms-fullscreen, :root .CLASS_NAME {
property:value;
}
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