Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap CSS bg-success alert not working

Tags:

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>
like image 557
chuckfinley Avatar asked Mar 18 '14 00:03

chuckfinley


People also ask

Which bootstrap 4 class can be used to create successful alert?

Bootstrap 4 provides an easy way to create predefined alert messages: × Success! This alert box indicates a successful or positive action.

How do you dismissible an alert?

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).

Which bootstrap 4 class is used to add links inside an alert message?

Use the . alert-link utility class to quickly provide matching colored links within any alert. This is a primary alert with an example link.


1 Answers

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

like image 174
martynas Avatar answered Oct 06 '22 16:10

martynas