Skip to content

Waiter!, there is a fly in my.. blog?

Here is the trick, Add the next code to your head section of your HTML:

<style type="text/css" media="all">
<?php
srand(time());
$randomx = (rand()%600);
$randomy = (rand()%400);
?>

a#tooCool
  {
    position: fixed;
    left:  <?php echo $randomx ?>px;
    top: <?php echo $randomy ?>px;
    display: block;
    height: 30px;
    width: 34px
    background: url(http://blog.levhita.net/fly.png) bottom right no-repeat;
    text-indent: -999em;
    text-decoration: none;
  }
</style>
 

Then this code to the body:

<a id="tooCool" href="http://blog.levhita.net/2006/09/21/waiter-there-is-a-fly-in-my-blog/" title="What do you want?">Waiter!, there is a fly in my… blog.</a>
 

And finally put this image on your blog.

mosca.png

Fix the code as needed and you are done (you will need PHP on your server, you can also do it with javascript, but I’m to lazy to make that kind of script).

This code is based in the well know, but now dead, Too Cool for IE campaign.

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*