Learn how to create a skill bar / Progress bar with CSS

Learn how to create a skill bar / Progress bar with CSS

Skills bar / Progress bar is often needed in a website, where a user want to show his skills or the progress of a given task. Via this tutorial we going to learn how to how to create a skill bar / Progress bar using CSS

Step 1: Adding HTML

<h2> MY Skills </h2>
<p>HTML</p>
<div class="container">
  <div class="skills html">90%</div>
</div>

<p>CSS</p>
<div class="container">
  <div class="skills css">80%</div>
</div>

<p>JavaScript</p>
<div class="container">
  <div class="skills js">65%</div>
</div>

<p>PHP</p>
<div class="container">
  <div class="skills php">60%</div>
</div>
Step 2) Add CSS:
/* Make sure that padding behaves as expected */
* {box-sizing:border-box}

/* Container for skill bars */
.container {
  width: 100%; /* Full width */
  background-color: #ddd; /* Grey background */
}

.skills {
  text-align: right; /* Right-align text */
  padding-top: 10px; /* Add top padding */
  padding-bottom: 10px; /* Add bottom padding */
  color: white; /* White text color */
}

.html {width: 90%; background-color: #4CAF50;} /* Green */
.css {width: 80%; background-color: #2196F3;} /* Blue */
.js {width: 65%; background-color: #f44336;} /* Red */
.php {width: 60%; background-color: #808080;} /* Dark Grey */

 

Complete code will look like this :

Learn how to create a skill bar / Progress bar with CSS
You may Also Like
Scroll to top