Please help me guys....
Here is the code
Css Code
Code: Select all
<style>
.progress_wrapper {width:295px;border:1px solid #ccc;position:absolute;top:220px;left:65%;margin-left:-150px}
.progress {height:20px;background-color:#000}
.progress_wrapper2 {width:300px;border:0px solid #757172;position:absolute;top:220px;left:65%;margin-left:-150px}
.progress2 {height:25px;background-color:#99CCCC}
body {
background-color: #9CC;
}
</style>
code in php
Code: Select all
$width = 0; // the starting width
$percentage = 0; // the starting percentage
$width_per_iteration = 300 / $count; // how many pixels should the progress div be increased per each iteration
ob_start();
while($myrow = pg_fetch_assoc($result)) {
echo str_repeat(' ', 256);
if ($width < 295){
echo '<div class="progress_wrapper"><div class="progress" style="width:' . $width . 'px;"></div></div>';
$width += $width_per_iteration;
}
if ($width > 295)
{
echo '<div class="progress_wrapper2"><div class="progress2" style="width:350 px;"></div></div>';
}
ob_flush();
flush();
}
Thanks