CSS Hacks For All Browsers

Posted By : Prince Kumar | 26-May-2016

CSS Hacks For All Browsers

I have find a css hack for all Browser (Chrome and Safari, Firefox, IE10, IE9, IE8, IE7). Because there are some properties which creates issue in webkit based browsers like chrome, safari and IE. Let us suppose that we can using this css code:

 

CSS target Chrome and Safari only

 

 @media screen and (-webkit-min-device-pixel-ratio:0) {
    /* Safari and Chrome, if Chrome rule needed */
    .selector { property:value; } 
	
    /* Safari 5+ ONLY */
    ::i-block-chrome, .selector { property:value; } 
}
 

CSS target Safari 9 but ONLY on iOS

 /* Safari 9+ (iOS Only) */
@supports (-webkit-text-size-adjust:none) and (not (-ms-accelerator:true)) {
     .selector { property:value; } 	 
}
 

CSS target Firefox only

 @-moz-document url-prefix() {
	.selector { property:value; } 
}
 

CSS target IE10 only

 @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
/* IE10+ specific styles go here */
	.selector { property:value; } 
}
 

CSS target IE9 only

 
 

CSS target IE8 only

 
 

CSS target IE7 only

 
 

About Author

Author Image
Prince Kumar

Prince is a sharp and intellectual UI Developer, he has a good knowledge of HTML. CSS, Jquery. His hobbies are reading books, listening music and net surfing,

Request for Proposal

Name is required

Comment is required

Sending message..