Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change bootstrap progress bar background (not the bar, but the bars Background)

Currently I am using a bootstrap progress bar

<div class="progress">
 <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
60%
 </div>
</div>

the default color of the bar is blue, I have managed to change this.

However, the default background of the not filled in part is white with grey radients, how can i change this to my own colour?

like image 503
user3506938 Avatar asked Apr 17 '14 18:04

user3506938


People also ask

Which bootstrap 4 class is used to add stripes to a progress bar?

Striped. You can also make the Bootstrap progress bar striped by using progress-bar-striped class.


2 Answers

You just need to overwrite the values on .progress with your own CSS.

.progress {
  background-color: #aaa;
  -webkit-box-shadow: none;
  box-shadow: none;
}

That will remove the shadow on the remainder of the progress bar, and change it to (in this case) a mild gray. You can pick whatever color value you'd like there.

That can go in the HTML itself (not generally preferred), or in your own CSS file (just make sure it's included after the Bootstrap CSS).

(A quick Plunkr to illustrate: http://plnkr.co/edit/WUDuq5XayN0nXEmtXY6V)

like image 125
Hupfen Avatar answered Oct 17 '22 23:10

Hupfen


You just need to put background color on progress to surround the bar:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="progress bg-warning">
 <div class="progress-bar bg-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
60%
 </div>
</div>
like image 35
Andre Shen Avatar answered Oct 18 '22 00:10

Andre Shen