Responsive IE 8

February 21, 2015 at 10:11 pm

It’s pretty important for website developers who wish to keep their sites responsive under older browsers, (especially IE 8), which do not support CSS3 Media queries natively.

Mr Scott Jehl, designer and developer from Florida, US has written a fast & lightweight polyfill javascript for min/max-width CSS3 Media Queries that are widely used by many responsive website designs, but not supported under older browsers like IE8.

Javascript minimized version of respond.js file is only 2.3 kB and should be linked in <head> section of your website, after all possible CSS stylesheet links and rules best just above ending </head> tag.

Another useful javscript is HTML5Shiv, invented by Sjoerd Visscher, which allows styling of HTML5 elements in older versions of Internet Explorer, which do not allow unknown elements to be styled without JavaScript.
It’s only 4.5 kB minimized and should be applied same way as described above.

For example in popular AVS video script, you should edit file “header.tpl” in current template directory and above </head> tag insert javascript link:

<script src="{$relative_tpl}/js/respond.min.js"></script>
<script src="{$relative_tpl}/js/html5shiv.js"></script>

Of course first you must have file “respond.min.js” and “html5shiv.js” which you can download as ZIP archive from Nuevolab resources here

Once unzipped you should upload javascript files to current template subdirectory “js”

Wthout this small fix your site looks and performs really weird under browser like IE8. After fix it works same as in all modern browsers!