Simple PHP Progress Bar
1. Create a function
print "
\n";
print "
";
";
if ($percentage > 5) {print "$percentage%";} else {print "
";}
print "
} ?>
2. In the style sheet include the following code
.all-rounded {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.spacer {
display: block;
}
#progress-bar {
width: 300px;
margin: 0 auto;
background: #cccccc;
border: 3px solid #f2f2f2;
}
#progress-bar-percentage {
background: #3063A5;
padding: 5px 0px;
color: #FFF;
font-weight: bold;
text-align: center;
}
3. Use below code in any part of you page where you want the progress bar to appear
No comments:
Post a Comment