Thursday, 11 September 2014

Internet Explorer 8

So it seems that IE8 does not support SVG or responsive websites very well.
This is a bit disappointing as IE8 is on lots of Uni machines and lots of staff have IE8 on their browser.

It seems very likely that this was Michael Stechman's problem too!

However, with a bit of work this morning, I think I have found a way around this - IE8 specific code!

Some helpful links:
    http://css-tricks.com/how-to-create-an-ie-only-stylesheet/

from which I copied the code:
<!--[if lte IE 8]> <link rel="stylesheet" type="text/css" href="ie8-and-down.css" /> <![endif]-->

A general terms for these are Conditional Comments - they seem to be an Internet Explorer specific thing.
    http://www.quirksmode.org/css/condcom.html


It's not just limited to styles sheets, you can also use this code in the html to include pictures and other content.


There is also some additional code required because of bootstrap as well.
I copied these from the bootstrap website:

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->


This is all required because some of the Cardiff Uni computers still use IE8!!! 

Let's hope my pages work on these now. 






No comments:

Post a Comment