Skip to content

Instantly share code, notes, and snippets.

@crh
Created January 21, 2013 19:28
Show Gist options
  • Save crh/4588562 to your computer and use it in GitHub Desktop.
Save crh/4588562 to your computer and use it in GitHub Desktop.
DDB index.html
<!DOCTYPE html>
<!--[if lte IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html> <!--<![endif]-->
<head>
<title>
Home Page
-
Deutsche Digitale Bibliothek
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Deutsche Digitale Bibliothek" />
<link rel="stylesheet" href="Content/themes/base/styles/ddb.min.css" media="screen" />
<link rel="stylesheet" href="Content/themes/base/styles/ddbPrint.min.css" media="print" />
<link rel="search" title="Deutsche Digitale Bibliothek" href="http://www.deutsche-digitale-bibliothek.de/opensearch.osdx" type="application/opensearchdescription+xml" />
<!--[if lt IE 9]>
<script src="Scripts/html5shim.googlecode.html5.js"> </script>
<![endif]-->
</head>
@crh
Copy link
Author

crh commented Jan 21, 2013

line 2-5: conditional html class

As explained in above link, we can use the conditional html class to get around
inconsiensies css in different version of Internet explorer.

Do we still need it, if we use twitter bootstrap?

line 17-19: If the User Agent is IE version less than 9, then load the script.

Why do we need it? Because IE version less than 9 does not support the new HTML
semantic elements such as header, footer, nav, section, etc

What happens if the user agent is IE version 8 and disable JavaScript

The history of the html5 shiv

@abrahaj
Copy link

abrahaj commented Jan 21, 2013

Kind of confusing, but trying to summarize so I can understand it.
HTML5 new elements can be visible in IE browsers by using JS techniques. (http://ejohn.org/blog/html5-shiv/)
In case no js available, we have to draw back to conditional if statements.

So your suggestion Christian?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment