karmi (owner)

Forks

Revisions

gist: 180955 Download_button fork
public
Description:
Kissing MSIE6 Good Bye
Public Clone URL: git://gist.github.com/180955.git
Embed All Files: show embed
application.js #
1
2
3
4
5
6
7
8
9
10
11
12
var Application = {
 
  MSIE6Warning : {
 
    show : function(text) {
      return $(document.body).insert({ top: "<div id='msie6_warning'><div class='content'>" + text + "</div></div>" })
    }
 
  }
 
};
 
msie6.css #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* MSIE6 Warning */
#msie6_warning
  { color: #fff;
    background-color: #CE301B;
    text-align: center;
    border-top: 2px solid #fff;
    border-bottom: 2px solid #fff;
    padding: 1em 1em 1.1em 1em; }
#msie6_warning .content
  { width: 1050px;
    margin: 0 auto; }
#msie6_warning *,
#msie6_warning a
  { color: #fff !important; }
#msie6_warning a
  { font-weight: bolder; }
 
page.html #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<html>
<head>
  <title>Kissing MSIE6 Good Bye</title>
  <meta charset="utf-8">
 
  <link rel="stylesheet" href="style.css">
  <!--[if IE 6]><link rel="stylesheet" href="msie6.css"><![endif]-->
 
  <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6/prototype.js"></script>
  <script src="application.js"></script>
</head>
<body>
 
  <h1>Your application/website</h1>
  <p>With some web development sanity retained.</p>
 
</body>
<!--[if lte IE 6]><script type="text/javascript">Application.MSIE6Warning.show('<p>We are sorry to inform you that you are using an obsolete browser, so this application probably won\'t look and behave as it should.</p> <p><a href="http://www.microsoft.com/windows/downloads/ie/">Please do upgrade to a new version of Microsoft Internet Explorer.</a>.</p>')</script><![endif]-->
</html>
 
style.css #
1
2
3
4
5
6
7
body
  { color: #222;
    background: #fff;
    font-size: 75%;
    font-family: 'Lucida Grande', Helvetica, Verdana, sans-serif;
    margin: 0;
    padding: 4em; }