How to write CSS hacks for IE 11 and Safari

|
| By Webner

In one of our projects we were working on, website page’s styling was not uniform when viewed on different browsers.

To solve this problem, we used CSS hacks for Safari and IE 11.

Tag for CSS hacks in IE 11:

@media all and (-ms-high-contrast: none),(-ms-high-contrast: active)
{
.ie10up{property:value;}
}

We can use this tag for IE 10 and above version.

Tag for CSS hack in Safari :

@media only screen and (-webkit-min-device-pixel-ratio: 1)
{
 ::i-block-chrome,#searchfield {
property:value;
}
} //This is used for safari 5.1 version

@media screen and (min-color-index:0) and(-webkit-min-device-pixel-ratio:0)
{
_:-webkit-full-screen, #searchfield
{
property:value;
}
} // This is used for Safari’s latest version

Webner Solutions is a Software Development company focused on developing CRM apps (Salesforce, Zoho), LMS Apps (Moodle/Totara), Websites and Mobile apps. If you need Web development or any other software development assistance please contact us at webdevelopment@webners.com

Leave a Reply

Your email address will not be published. Required fields are marked *