IE8 rendering of local-files is wrong

Posted by Eric on Stack Overflow See other posts from Stack Overflow or by Eric
Published on 2010-05-10T18:07:22Z Indexed on 2010/05/10 18:14 UTC
Read the original article Hit count: 304

Filed under:
|
|
|
|

It appears that IE8 is not rendering properly a local file:

Consider this simple webpage: http://sayang.free.fr/ie8render.html (html code below) extracted from a w3c tutorial on opacity.

Save it locally and display it again: the local file has no opacity!

That's very annoying, especially when one wants to design complex pages on prototypes placed in local files.

Do you have a solution to that ?

<html>
  <head>
    <title>IE8 Local File</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="-1" />

    <style type="text/css">
    div.background
      {
      width: 500px;
      height: 250px;
      background: url(http://www.w3schools.com/css/klematis.jpg) repeat;
      border: 2px solid black;
      }
    div.transbox
      {
      width: 400px;
      height: 180px;
      margin: 30px 50px;
      background-color: #ffffff;
      border: 1px solid black;
      /* for IE */
      filter:alpha(opacity=60);
      /* CSS3 standard */
      opacity:0.6;
      }
    div.transbox p
      {
      margin: 30px 40px;
      font-weight: bold;
      color: #000000;
      }
    </style>
  </head>
  <body>
    <h2>Save this file locally and open it to see the difference</h2>
    <div class="background">
      <div class="transbox">
        <p>This is some text that is placed in the transparent box. This is some text that is placed in the transparent box. This is some text that is placed in the transparent box. This is some text that is placed in the transparent box. This is some text that is placed in the transparent box.</p>
      </div>
    </div>
  </body>
</html>

© Stack Overflow or respective owner

Related posts about ie

Related posts about opacity