For some reason bg-danger class in Bootstrap 3 does not display red background. Why?
<p class="bg-danger">There was an error updating your details.</p>
Bootstrap 4 provides an easy way to create predefined alert messages: × Success! This alert box indicates a successful or positive action.
To close the alert message, add a . alert-dismissible class to the alert container. Then add class="close" and data-dismiss="alert" to a link or a button element (when you click on this the alert box will disappear).
Use the . alert-link utility class to quickly provide matching colored links within any alert. This is a primary alert with an example link.
In Bootstrap you have the following pre-defined backgrounds:
Bootstrap 3.1.0:
<div class="bg-primary">...</div>
<div class="bg-success">...</div>
<div class="bg-info">...</div>
<div class="bg-warning">...</div>
<div class="bg-danger">...</div>
Bootstrap 3.0.3:
<div class="alert alert-success">...</div>
<div class="alert alert-info">...</div>
<div class="alert alert-warning">...</div>
<div class="alert alert-danger">...</div>
Bootstrap components
View all Bootstrap components here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With