O'Reilly logo

Bootstrap for Rails by Syed Fazle Rahman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required