HTML5 and previous browsers

  • Using HTML5 semantic elements today
  • The Story of the HTML5 Shiv by Paul Irish
  • html5shiv (from GitHub)
  • CSS Specific for Internet Explorer
    1. IE Conditional Comments
      <!--[if IE 8]>
      <style type="text/css">
      	/* css for IE 8 */
      </style>
      <![endif]--> 
      <!--[if lt IE 8]>
      	<link href="ie7.css" rel="stylesheet" type="text/css" />
      <![endif]-->
    2. CSS Rules Specific to Explorer (IE CSS hacks)
      .box {
      	background: gray; /* standard */
      	background: pink\9; /* IE 8 and below */
      	*background: green; /* IE 7 and below */
      	_background: blue; /* IE 6 */
      }
      
    3. Conditional HTML Class
      <!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
      <!--[if 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)]><!--> <!--< ![endif]-->
      
This entry was posted in Computer, Dev, Technology. Bookmark the permalink.

Leave a Reply