Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Progress Bar with HTML and CSS

I want to create a progress bar like in the below image:

Progress Bar Example

I have no idea about creating this. Should I use HTML5 techniques?

Would you please give me some help about creating this progress bar?

like image 435
Shahin Avatar asked Aug 25 '11 13:08

Shahin


People also ask

How do I display the progress bar in CSS?

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 create a progress bar in HTML?

Tip: Use the <progress> tag in conjunction with JavaScript to display the progress of a task. Note: The <progress> tag is not suitable for representing a gauge (e.g. disk space usage or relevance of a query result).

How do you make steps progress bar only in CSS?

Make Structure Css and Html < div class="container" ></ div > : This the container will make wrapp the element inside. < ul class="progressbar" > : I will add < ul >< /ul > With class name progressbar. in the . container , I give the width 100% .


2 Answers

#progressbar {    background-color: black;    border-radius: 13px;    /* (height of inner div) / 2 + padding */    padding: 3px;  }    #progressbar>div {    background-color: orange;    width: 40%;    /* Adjust with JavaScript */    height: 20px;    border-radius: 10px;  }
<div id="progressbar">    <div></div>  </div>

Fiddle

(EDIT: Changed Syntax highlight; changed descendant to child selector)

like image 108
RoToRa Avatar answered Oct 23 '22 01:10

RoToRa


http://jsfiddle.net/cwZSW/1406/

#progress {      background: #333;      border-radius: 13px;      height: 20px;      width: 300px;      padding: 3px;  }    #progress:after {      content: '';      display: block;      background: orange;      width: 50%;      height: 100%;      border-radius: 9px;  }
<div id="progress"></div>
like image 34
Madara's Ghost Avatar answered Oct 23 '22 02:10

Madara's Ghost