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

Alerts

Alerts are extremely important to communicate messages with your website users. They stand out, bright and distinguished from the rest of the page elements. You should not mistake these alerts with the alert windows in browsers. These alerts are HTML elements designed to behave like an alert.

A simple alert markup is shown in the following code:

<div class="alert alert-success">Message sent!</div>

This produces the following result in a browser:

Alerts

Alerts come with four different color variants:

  • .alert-success: This varient is used for a green color
  • .alert-info: This is used for a light blue color
  • .alert-warning: This for a dull orange color
  • .alert-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