Home » CSS hack for IE10, IE11 and Webkit browsers

CSS hack for IE10, IE11 and Webkit browsers

Recently I got an issue notice in one of my client’s site which was only visible in IE10, 11 and Webkit browsers.
The issue was strange and I couldn’t find a correct way to fix the issue. Because I found that IE10 & 11 had a problem in rendering the height and width of an element when applying max-width, so I had to use CSS hack to fix the issue.

==== IE10 and IE11 ====
				
					@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
   h1{color:red;}
}
				
			
==== Webkit Browser Only ====
				
					@media screen and (-webkit-min-device-pixel-ratio:0) {
   h1{color:blue;}
}
				
			

This hack worked very well for me 🙂

About Author
Picture of W3Mind

W3Mind

W3Mind focuses on Blogging, Make Money Online, SEO, Business Blogging, Social Media, WordPress, Internet Tools, Web Design and Development.
Give it a Share
Facebook
Twitter
LinkedIn
You May Also Like
How to
START A
BLOG
(step by step)
Load WordPress Sites in as fast as 37ms!