Book Image

Bootstrap for Rails

By : Syed F Rahman
Book Image

Bootstrap for Rails

By: Syed F Rahman

Overview of this book

Table of Contents (18 chapters)
Bootstrap for Rails
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating and styling buttons


In the preceding chapter, we saw a gist of how buttons are created in Bootstrap. Any anchor tag <a> or <button> tag can be made to look like a fancy button using Bootstrap. To create a button, you need to use the class .btn in combination with many other helper button classes. There are two different types of button classes in Bootstrap: for different sizes and for different colors.

The button classes for different colors are as follows:

  • btn-primary: This button class is used for creating a dark-blue button

  • btn-info: This is used for creating a light-blue button

  • btn-success: This button class is used for creating a green-colored button

  • btn-warning: This class is used for creating a pale yellow-colored button

  • btn-danger: This is used for creating a red-colored button

  • btn-default: This class is used for creating a white-colored button

  • btn-link: This class is used to make buttons look like a link while preserving the behavior of a button

Let's see the...