Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Thinner Bootstrap progress bars?

Tags:

How can I make the progress bars thinner with Bootstrap 3.0? I'm thinking how the YouTube like/dislike meter looks (the blue bar). I've tried searching for any CSS tricks but could not find anything.

like image 352
user2019594 Avatar asked May 01 '14 18:05

user2019594


People also ask

How can I change bootstrap progress bar size?

Height of Progress Bar: Use CSS property to change the height of progress bar. The default height of progress is 16px. The height of progress and progress-bar container must be the same.

How do I change the width of a progress bar in HTML?

A normal <div> element can be used for a progress bar. The CSS width property can be used to set the height and width of a progress bar.

How do I make my bootstrap progress bar dynamic?

For creating a default static progress bar, we need the following elements. aria-valuenow- This is known as curent progress bar value. aria-valuemin- This is known as initial value of the progress bar value. aria-valuemax- This is known as maximum value of the progress bar value.


2 Answers

As easy as doing this:

.progress {height: 10px;} 

See: Reduce the height of progress bar

Extra, if you want to show the text inside the progress bar:

.progress {height: 20px;} // we increased it so the text is visible or change font size .progress .sr-only { position: relative; } 

See: Show text inside progress bar

like image 126
Shina Avatar answered Sep 28 '22 00:09

Shina


Shina is right, I just would like to add, it may be in some cases necessary to add the !important command to make the change apply over the already set parameter of the "progress" class, like this:

.progress {height: 10px !important;} 
like image 31
JCO9 Avatar answered Sep 27 '22 22:09

JCO9