Posts Tagged ‘html’
My Fake Page Rank Bar with CSS
Hey,
The new year is getting off to a slow start, but here’s something that maybe of use to someone…We had a problem showing a PageRank bar on our site, something to do with IE bitching about non secure items, so to save an API call and bandwidth I made this. Now we just get the PageRank and display some div’s!
< ?php
$pagerank = rand(0,10);
?>
<style>
div.pagerank-holder
{
height:5px;
width:50px;
background-color:#f7f7f7;
border:1px #848484 solid;
float:left;
}
.rank
{
background-color:#009933;
height:5px;
float:left;
}
</style>
<p>Page rank: < ?php echo $pagerank;?> </p>
<div class="pagerank-holder">
<div class="rank" style="width:<?php echo ($pagerank/10)*100;?>%"></div>
</div>