I've been spending a bit of time today looking into how to get bootstrap to work with IE8+ and came across Bootstrap's docs http://getbootstrap.com/getting-started/#browsers, however translating all of this into how to do it in Drupal is a bit confusing.
The first thing that IE support requires is respond.js, with the caveat that bootstrap CSS must be served locally, unless you want to go through even more effort to allow cross-domain CDN. It also suggests adding a meta tag to support compatibility modes.
I think that this stuff should be covered in the Bootstrap theme documentation as there are quite a few steps (along with NOT using the theme info file to serve the bootstrap css) that may not be quite so straight forward for others. The following steps will make your Bootstrap subtheme work with IE8+ :
1) You must follow Method 1 from https://drupal.org/node/1978010
2) Copy theme/system/html.tpl.php from the bootstrap theme into my_sub_theme/templates
3) In your sub theme's html.tpl.php replace
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
with
<!--[if lt IE 9]>
<script src="/sites/all/themes/my_sub_theme/bootstrap/assets/js/html5shiv.js"></script>
<script src="/sites/all/themes/my_sub_theme/bootstrap/assets/js/respond.min.js"></script>
<![endif]-->
4) To serve bootstrap's css locally add the following above
print $styles
add:
<link href="/sites/all/themes/my_sub_theme/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />
5) Add the following meta tag in html.tpl.php with the other meta tags
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Comments
Comment #1
acbramley commentedComment #2
duntuk commentedThanks for the explanation. Just read over the documentation and thought to my self how the project page lists a bunch of cool features, but when you try reading about how to implement them with this theme, it's pretty lacking.
Comment #3
markhalliwellSee the section about "documentation" (it does exist).
Scripted response:
Supported code
This project only supports Drupal versions 7.x-3.x and higher.
This project only supports Bootstrap versions 3.0.0 and higher.
This project only supports jQuery versions 1.7 and higher.
Anything that falls outside the scope of this support will be either escalated to the current version or marked as "Closed (won't fix)".
Documentation
There's been some amazing Drupal Community work done around Bootstrap. Many of your questions can be answered in our Bootstrap Documentation section by individuals who have helped further expand Bootstrap's integration with Drupal:
* Bootstrap related modules
* Bootstrap sub-theming "how to"
* Bootstrap theming techniques and tips
If you find documentation in these locations inaccurate or missing, please update it yourself (all logged in users have edit capability).
Creating new issues
PLEASE SEARCH THE ISSUE QUEUE FIRST. DO NOT DUPLICATE EXISTING ISSUES.
It is also strongly recommended you read: How To Solve All Your [Drupal] Problems.
This project's issue queue should only be used when existing/new bugs are found or new feature requests are desired to integrate Bootstrap into Drupal. It should not be used to create issues against the Bootstrap framework, please go to https://github.com/twbs/bootstrap/issues and file them there.
The following support questions should also not be asked here:
* CSS/Layout (site specific)
* LESS or SASS syntax/integration
* JavaScript, Bootstrap or custom (site) plugins
* Integration with modules that don't work in multiple themes (file the issue with that module).
If you create an issue and it has been marked as "Closed (won't fix)", please visit Drupal StackExchange. It is an amazing resource for asking questions, learning new techniques and overall general support. Please do not blow up this project's issue queue with the equivalent of: "Help me! I don't want to read the multitude of documentation found by a simple Google search."
Comment #4
acbramley commented@Mark Carver thanks for the response, yes I have read the documentation section.
Comment #5
markhalliwellSpecifically: