nice progress bar
by Michael Dibbets
HTML
<div class="custompagination">
<div class="line"></div>
<ul>
<?php
foreach($pagesClickThrough as $page) {
echo '<li class="pageitem '.($pageCurrent == $page ? 'active':'').'">'.$page . '</li>';
}
?>
</ul>
</div>
CSS
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}
.custompagination {
margin: 50px auto;
padding: 30px 30px 40px;
background-color: #f2f2f2;
position: relative;
}
.custompagination ul {
margin: 0;
padding: 0;
position: relative;
top: -20px;
}
.custompagination li {
display: block;
width: 20px;
height: 20px;
float: left;
background-color: #fff;
border-radius: 10px;
font-family: "Helvetica Neue", sans-serif;
font-weight: 200;
font-size: 16px;
text-align: center;
position: relative;
margin: 0 20px;
line-height: 4.5;
color: #bfbfbf;
}
.custompagination li:hover:before {
-moz-box-shadow: inset 0 0 10px #000000;
-webkit-box-shadow: inset 0 0 10px #000000;
box-shadow: inset 0 0 10px #000000;
cursor:hand;
cursor:pointer;
}
.custompagination li:before {
content: "";
display: block;
width: 8px;
height: 8px;
background: #bfbfbf;
border-radius: 4px;
position: absolute;
top: 6px;
left: 6px;
z-index: 10;
}
.custompagination .active {
color: #df6a6a;
}
.custompagination .active:before {
content: "";
display: block;
width: 10px;
height: 10px;
background: #df6a6a;
border-radius: 10px;
position: absolute;
top: 5px;
left: 5px;
z-index: 10;
}
.custompagination .line {
display: block;
background: #fff;
height: 10px;
border-radius: 5px;
z-index: 3;
position: relative;
top: -5px;
}
.custompagination .line:before {
content: "";
border-bottom: 1px solid #bfbfbf;
height: 0;
width: calc(100% - 10px);
position: absolute;
top: 5px;
left: 5px;
z-index: 5;
padding: 0 20px;
}