Skip to content

Instantly share code, notes, and snippets.

@elisechant
Created December 2, 2013 01:42
Show Gist options
  • Save elisechant/7743687 to your computer and use it in GitHub Desktop.
Save elisechant/7743687 to your computer and use it in GitHub Desktop.
IE7 Handling
<!DOCTYPE html>
<!--[if lt IE 8]> <html class="lte-ie7" lang="en-au"><![endif]-->
<!--[if IE 8]> <html class="ie8" lang="en-au"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en-au"> <!--<![endif]-->
<head>
<!-- Force IE to use highest browser compatibility -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!--
// ...
-->
</head>
<body>
<?php
// Displays a message instead of body for low IE browsers
?>
<!--[if lt IE 8]><table class="ie7-prompt"><tr><td class="ie-left-cell"><img src="../../assets/images/content/commonwealth-bank-logo.png" width="165" height="27" alt="The Commonwealth Bank" /></td><td class="ie-right-cell">You are using an outdated version of Internet Explorer. For security reasons you should upgrade your browser. Upgrade to a <a href="http://whatbrowser.org/">modern browser</a>, such as Google Chrome or go to Windows Updates to install the latest version of Internet Explorer.</div></td></tr></table><![endif]-->
<?php // /end ?>
/*
|--------------------------------------------------------------------------
| IE7 rules
|-------------------------------------------------------------------------
|
| No support for <= IE7. Instead we should a blank page with a message to
| update the browser
|
| This stylesheet is served exclusively to IE8 outside of main.css
| Do not use global vars from ../config in here
|
|*/
/*html*/.lte-ie7 {
/*
|-------------------------------------
| Body handling
|-------------------------------------
|*/
body {
background: white !important;
background-image: none !important;
}
body > * { display: none; }
/*
|-------------------------------------
| The update your Browser Message
|-------------------------------------
|*/
.ie7-prompt {
display: block !important;
width: 960px;
margin: 0 auto;
margin-top: 200px;
font-size: 14px;
padding: 10px;
> * {
display: block !important;
}
.ie-left-cell {
width: 180px;
}
.ie-right-cell {
padding-left: 1.25em;
border-left: 1px solid #e6e6e6;
}
a {
color: blue;
text-decoration: underline;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment