1

This is the first time I am asking a question on here so pardon me if I don't format this correctly.

I've been working with rails for the past month, so it's still relatively new for me. So far I've been able to find an answer to every question, but I can't seem to find an answer to this one.

When I went to bed last night my Bootstrap columns were aligned perfectly. When I woke up this morning they were all of a sudden completely out of alignment on every single one of my pages. By this I mean that, instead of a column structure, each column takes up a new row.

Here's my Gemfile:

gem 'rails', '4.1.6'
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'bootstrap-sass'
gem 'httparty'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0',  
gem 'spring',  
gem 'bcrypt', '~> 3.1.7'

My custom.css.scss file starts with:

@import "bootstrap-sprockets";
@import "bootstrap";

and I've formatted most my html like this:

<div class="container">
  <div class="row">
   <div class="col-md-2">
     stuff here
   </div>
   <div class="col-md-8">
     other stuff
   </div>
   <div class="col-md-2">
     some more stuff
   </div>
 </div>
</div>

When I use dev tools on the pages, it seems like the columns are properly inheriting the bootstrap css, but they still aren't getting formatted.

Any ideas? Thanks in advance.

  • 2
    Are you viewing your pages in a width between 768px and 980px? Bootstrap col-md works between 768-980. You are missing any col-xs or col-sm classes, so anything below 768px is going to be a full col-xs-12 column. – chconger Oct 02 '14 at 12:49
  • I had thought of that, but no. Still doesn't work no matter how I resize my browser. – user3838340 Oct 02 '14 at 16:15
  • What is you browser (and version) ? Is it the same in another browser ? – Fred Perrin Oct 02 '14 at 16:34
  • I just took a look at it in Firefox and it works. I should have thought of that. I was developing in Google Chrome version 37.0.2062.124. I'm going to start looking into problems with this gem for chrome browsers specifically, but if you know why it might not be working I would really appreciate your input. Thank you! – user3838340 Oct 03 '14 at 16:57

0 Answers0