ExtJS Javascript Library for Beginners!

The Ext Javascript library for beginners, as I learn ExtJS so will you!

Posts Tagged ‘html

My Fake Page Rank Bar with CSS

leave a comment »

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>

Written by jameshd

5th January, 2009 at 4:21 pm

Posted in Randoms

Tagged with , ,

Follow

Get every new post delivered to your Inbox.