user2444917
user2444917

Reputation: 3

How to change a fixed layout on twitter bootstrap to fluid using ruby on rails

Im not sure on how to change my ruby on rails application to fluid. At the moment it is fixed using sass twitter bootstrap and im struggling on finding the right way to change the entire application to fluid.

Could someone please point me in the right direction thanks.

Upvotes: 0

Views: 111

Answers (1)

Mohamad
Mohamad

Reputation: 35349

In order to use fluid layouts in Bootstrap you must do two things:

  1. Replace .row classes with .row-fluid in your view templates.
  2. Load the responsive layout css file.

If you are using SASS, and assuming you have an application.css.scss file, make sure it's set up the following way:

@import "bootstrap";
@import "bootstrap-responsive";

Finally, when using a fluid grid make sure inner columns always add up to a total of 12:

<div class="row-fluid">
  <div class="span6"></div>
  <div class="span6"></div>
</div>

You can use any number of columns as long as they always add up to 12.

Upvotes: 1

Related Questions