CSS Pie & IE Meta Tag

189 views Asked by At

I've been using CSS3 Pie on my site with great success. I recently had a Jotform form with a custom CSS button with radius, Pie doesn't work with Jotform so I came across this meta tag

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

which when added to the particular page resolved the radius issue in IE8.

My question is this, if it's this simple to allow older versions of IE to render modern CSS can this tag be utilized as default and if not why not i.e bad practice, technical reasons etc.

It seems to good to be true so I'm guessing there has to be a reason, I'm aware it doesn't validate but to avoid this it can be added to an .htaaccess file.

2

There are 2 answers

0
Ilya Streltsyn On

This meta tag is needed to prevent IE8—10 from switching to Compatibility mode (which means more or less emulation of the IE7 renderer). In most cases, it's a good practice to use the latest available rendering engine, so it's better to keep this meta tag.

Also, be sure that pages have the proper Doctype (<!DOCTYPE html> will be enough for almost all practical applications), so other browsers also could display them using the newest rendering mode, according to the latest standards that browsers can support.

1
Praveen On
!--  Force IE to use the latest version of its rendering engine -->  
<meta http-equiv="X-UA-Compatible" content="IE=edge">

The above meta tag is used to force IE to use the latest version of its rendering engine.

In case if user opens in IE8 browser with IE8's default rendering engine? This will certainly fails. Therefore it is good to use CSS3PIE along with this meta tag.

You can check this in MSDN Library.