Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to format background color using twitter bootstrap?

I am playing with the styles on the website here: http://www.grabapper.com

I am trying to include background-color #2ba6cb on the hero unit. When I include:

<div class="row" style ='background-color: #2ba6cb;'>

The color doesn't go all the way to the edge of the page. How do I get the background color to go to the edge of the page?

like image 305
sharataka Avatar asked May 02 '13 21:05

sharataka


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.

How do I change the background color of a row in Bootstrap?

In order to change the color of the table row, we need to specify in <tr> tag with the required class & for changing the color of the table row then specify it inside <td> tag with the required class.

How does Twitter use Bootstrap?

Twitter Bootstrap is a front end framework to develop web apps and sites fast. In modern web development, there are several components which are required in almost all web projects. Bootstrap provides you with all those basic modules - Grid, Typography, Tables, Forms, Buttons, and Responsiveness.


1 Answers

Bootstrap default "contextual backgrounds" helper classes to change the background color:

.bg-primary
.bg-default
.bg-info
.bg-warning
.bg-danger

If you need set custom background color then, you can write your own custom classes in style.css( a custom css file) example below

.bg-pink
{
  background-color: #CE6F9E;
}
like image 157
Khandad Niazi Avatar answered Sep 30 '22 06:09

Khandad Niazi