Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

White background class in Bootstrap

Tags:

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?

like image 331
Sharpless512 Avatar asked Jan 31 '14 09:01

Sharpless512


People also ask

How do I change the background color in Bootstrap?

We can add background color to a div by simply adding class “bg-primary”, “bg-success”, “bg-danger”, “bg-info”, and many more as shown in the following examples.

What is contextual classes of color in Bootstrap?

The Bootstrap Contextual Class allows you to change the background color of your table rows or individual cells.

What is grayscale Bootstrap?

Grayscale is a multipurpose, one page website theme featuring a dark layout along with smooth scrolling page animations.


1 Answers

Since Bootstrap 4, Bootstrap does have white, light and dark background classes.

HTML:

<div class="bg-light text-dark">Light background</div>
<div class="bg-dark text-white">Dark background</div>
<div class="bg-white text-dark">White background</div>

Source : Background Color - Bootstrap Docs

like image 124
Suriteka Avatar answered Dec 06 '22 16:12

Suriteka