Sharpless512 Sharpless512 - 6 months ago 19
CSS Question

White background class in Bootstrap

I'm searching for a class that makes the element a white background.

maybe something like .bg-white, I couldn't find it in Bootstrap but maybe its hidden somewhere?

Answer

Bootstrap doesn't have a white background class.

Create your own:

.white-bg{
    background:#ffffff !important;
}

This can be placed in bootstrap.css or your own custom stylesheet if you've created one.

The only backgrounds there are in bootstrap are:

.bg-primary
.bg-success
.bg-info
.bg-warning
.bg-danger

Source: Bootstrap website