Drupal 7 – IE fix for Bootstrap 3 theme

Previously i have a post about using Bootstrap 3 theme in Drupal 7.

 

If the website you are building needs IE 8 support, a few hacks has to been done. Please note that using CDN to serve the Bootstrap source files will not work in this case. So you have to use method 1 to serve the Bootstrap source files locally when installing the Bootstrap 3 theme in Drupal as stated here.

1. Copy the system/html.tpl.php from the Bootstrap 3 base theme to your subtheme templates folder.

2. Replace the

  <!-- HTML5 element support for IE6-8 -->
  <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->

 

To:

  <!-- HTML5 element support for IE6-8 -->
  <!--[if lt IE 9]>
    <script src="/sites/all/themes/street/bootstrap/assets/js/html5shiv.min.js"></script>
    <script src="/sites/all/themes/street/bootstrap/assets/js/respond.min.js"></script>
  <![endif]-->

 

3. Add the following meta

<meta http-equiv="X-UA-Compatible" content="IE=edge">

 

Done =)

Reference: Drupal Bootstrap – Document internet explorer support

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.