I inherited a web application where the front end uses new HTML5 tags (header, nav, section tags) and new CSS3 style attributes (rounded borders). The website looks amazing in Google Chrome and Safari.
However, the client now complains the website is broken for IE7 and IE8. Everything is out of alignment and most of the styles do not render.
What is the easiest way to make this website work in IE7 and IE8? Do I have to: a) Apply some hack to make IE browsers accept the new HTML5 and CSS3 features? b) A complete rewrite of the front end?
Most notable is that IE8 Supports all of CSS2.
IE6 (in non-quirks mode): You write CSS for the IE6 limitations (hacks upon hacks) and sleep poorly. IE8 (in IE8/non-quirks mode): You write CSS which is [generally] compatible with other modern browsers and have happier dreams :p~
Internet Explorer browser version 9 and Internet Explorer browser version 11 supports HTML5 semantic elements property.
Microsoft Internet Explorer 6 (IE6) is a graphical web browser developed by Microsoft for Windows operating systems. Released on August 24, 2001, it is the sixth, and by now discontinued, version of Internet Explorer and the successor to Internet Explorer 5.
Try this lovely script (.js) :)
And for rounded corners i use an other script (.htc)
use the 1st:
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
use the 2nd like:
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-khtml-border-radius: 4px;
border-radius: 4px;
behavior: url(border-radius.htc);
Happy sitebuilding :)
The original link is no longer active and HTML5shiv has moved.
Now available on GitHub
https://github.com/aFarkas/html5shiv
For HTML5, I recommend Remy Sharp's HTML5 Shim, although to see the effect, your IE users will need to have JavaScript enabled. Basically it exploits an error in IE6/7/8 which allows HTML5 elements to be recognised after they have first been created in JavaScript using the document.createElement
function.
For your CSS, there are a few different hacks such as CSS3 PIE that use the "behaviour" property (which is unique to IE) to simulate CSS3 effects. I have personally refrained from these though, since in my experience, they break very easily, and end up being more hassle than they're worth. I instead tend to write my CSS so that it degrades gracefully in IE, so that rounded buttons look square, but still look nice.
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