Andy Bas
Andy Bas

Reputation: 217

Rails with bootstrap-generators gem has zero styling in IE8 but does in IE9

Using

gem 'bootstrap-generators', '~> 2.0'
gem 'simple_form', '~> 2.0'

Bootstrap style is non-existant in IE9 and under, but shows fine in IE10 via http://netrenderer.com/.

my bootstrap-generators.css.scss:

@import "bootstrap-variables";

body {
  padding-top: $navbarHeight + 20px;
  padding-bottom: 40px;
}

.page-header {
  a.btn {
    float: right;
  }

  a.btn + a.btn {
    margin-right: 8px;
  }
}

@import "scss/bootstrap";
@import "scss/responsive";

Any thoughts?

Upvotes: 2

Views: 429

Answers (2)

Andy Bas
Andy Bas

Reputation: 217

The cause is described here Rails 3.1, assets pipeline and IE 6 & 7 in production mode - some CSS & js are not loaded properly

We had to split up the css, and now all works fine.

Upvotes: 1

mraaroncruz
mraaroncruz

Reputation: 3809

You probably are using HTML5 elements that IE8 can't process for example <section>.
Try adding this to the <head> of the layout file

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

If it renders correctly, that was your problem.

Upvotes: 1

Related Questions