Video Tutorial for Designing Static Progress Bar

This tutorial we will demonstrate the way to design the basic progress bar. First, we will look into the design concept to be used, then will try to make the progress bar quite attractive.

Basic Layout:-

Designing Static Progress Bar

Designing Static Progress Bar

Video Tutorial:-

Desired Output:-

OutPut-Video Tutorial for Designing Static Progress Bar

OutPut-Video Tutorial for Designing Static Progress Bar

To achieve the above design below is the simple code,

HTML

<div class="progressBar">
 <div class="progressText">40%</div>
 <div class="progressBarIndicator"></div>
</div>

CSS

.progressBar {
width: 100%;
height: 16px;
border-radius: 8px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5) inset;
background: #9DA5B0;
background: -o-linear-gradient(top, #9DA5B0 0%, #B6BCC6 100%) repeat scroll 0 0 transparent;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0,#9DA5B0), color-stop(1,#B6BCC6)) repeat scroll 0 0 transparent;
background: -webkit-linear-gradient(top, #9DA5B0 0%, #B6BCC6 100%) repeat scroll 0 0 transparent;
background: -moz-linear-gradient(top, #9DA5B0 0%, #B6BCC6 100%) repeat scroll 0 0 transparent;
background: -ms-linear-gradient(top, #9DA5B0 0%, #B6BCC6 100%) repeat scroll 0 0 transparent;
}
.progressBarIndicator {
width: 40%;
height: 14px;
border-radius: 8px;
overflow: hidden;
position: relative;
top: -16px;
border: 1px solid #4C8932; box-shadow: 0 1px 0 0 #DBF383 inset, 0 -1px 1px #58C43A inset;
background: #9DA5B0; background: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0,#9BDD62), color-stop(1,#74D04C)) repeat scroll 0 0 transparent;
background: -webkit-linear-gradient(top, #9BDD62 0%, #74D04C 100%) repeat scroll 0 0 transparent;
background: -moz-linear-gradient(top, #9BDD62 0%, #74D04C 100%) repeat scroll 0 0 transparent;
background: -ms-linear-gradient(top, #9BDD62 0%, #74D04C 100%) repeat scroll 0 0 transparent;
background: -o-linear-gradient(top, #9BDD62 0%, #74D04C 100%) repeat scroll 0 0 transparent;
}
.progressBarIndicator:after {
content: "";
display: block;
height: 16px;
width: 100%;
background : url(progress_divider.png) repeat;
}
.progressText {
width: 100%;
height: 16px;
overflow: hidden;
font-size: 14px;
color: #000;
font-weight: bold;
text-align: center;
line-height: 16px;
position: relative;
z-index: 1;
}

Now you can use this progress bar at different desired places. Enjoy coding 🙂

Written By: Ashis Kumar, Software Developer, Mindfire Solutions

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s