21 February 2017

Ruby on Rails | Bootstrapping

What you should know about using Bootstrap alongside of RoR

    • Understanding Bootstraps 12 columns grid system.
    • Combine <blockquote> and <footer>  to get awesome quote effects. 
    • With class="row" you'll get a column without padding
    • When designing responsive website, keep in mind, Bootstrap will use the smallest break point first. for eg. class="col-lg-6 col-xs-4" On ipads or tablets (medium size) col-xs-4 will be used.
    • All columns will be placed from left to right. If you want to force them to be placed more right than it should be, you can use offset attribute. class="col-lg-3 col-lg-offset-6" This will create an element that take 3 columns and place it six column from the left or from its original place .
    • Class="container" will centered your container, while class="container-fluid" will stretch the your container to cover the whole screen.    
    • To apply Bootsraps forms to rails model backed form, you'll need to modify your ruby code into something like this: <%= form_for(@variableName, :html => {class= "BootstrapFormElement", role: "form"}) do |f| %>

    No comments:

    Post a Comment