I use bootstrap 3.0.3 in my web page and add html5shiv lib and respond lib for fix it this but it is not worked on internet explorer 8.
my html code:
<div class="container">
<div class="row">
<div class="col-sm-4" style="background:red;"> </div>
<div class="col-sm-4" style="background:green;"> </div>
<div class="col-sm-4" style="background:blue;"> </div>
</div>
</div>
Its worked good in FF and Webkits browsers but result in IE :
Now demo is here, how can I fix it?
If "responsiveness" is not required, you can use col-xs-* classes instead of setting up proxy for respond.js. It works, because col-xs-* classes are media-agnostic. It solved the issue in my case.
Addition you need remember that bootstrap.css is above respond.js in your head section:
Based on the solution in the thread : Must Bootstrap container elements include row elements?, your markup should be :
and use this CSS to achieve it in IE8:
here is the working demo
The
.row
class is not required inside a.container
, but if you include then, container > row is the order not row > container (which you code)!EDIT
It might be worth noting that
respond.js
only works for local files. So if you have gotcss
files of bootstrap from CDN for your website on IE8, it won't work, instead, try with a local copy ofbootstrap.css
Source : Getbootstrap
It might be better to apply this in a way that would only apply to IE and not any other browsers as it can break some of your responsive web sites. This page speaks specifically to how to apply IE only CSS.
Apply CSS rules if browser is IE