Stupid CSS

Well I am embarking on a journey to nowhere. A technology wank for the sake of wanking. Anyway here’s the deal. I want to change the image in the header of this blog based on the time of day. I could do this by simply writing a new image to the image directory from a database with php running on a cron job but what fun is that. The second part of this exercise in futility is to change the link colors to match the images color. So I figure what’s a little javascript to do it. Well JS can’t change the color of pseudo-classes like :hover so I am stuck. Oh and through all of this I have been thinking of making the header Flash so I can also add audio into the mix. So what to do. Here are some of the solutions that I thought of.

  • When a user comes to the site they load the image and style for that image and it remains static for their session, boring.
  • I use flash to randomly pull images in based on time and leave the styles a generic grey or something equally as much of a cop out.
  • I get flash to load an image and then use JS to refresh the page to load a new style sheet for that image.
  • Lastly I use Unity to broadcast to all active users that they need to change their image to the same one. Flash then uses FSCommand to trigger a JS function that changes the class or the body tag to change the link colors.

All of these options are pretty ridiculous and really a waste of time but boy will I have a kick ass header!

4 Responses to “Stupid CSS”

  1. robert Says:

    Dude,

    I like the flash idea but why not use PHP to see what time it is on the server and then switch out your entire CSS w/ php along with sending the proper info to Flash to change the header?

    Anyways, sounds like fun man.

    Cheers,
    R

  2. Brettf Says:

    Well php can’t push data to flash.

  3. robert Says:

    well then your FUBAR for your fun w/ flash and css option i guess.

    R

  4. manny dather Says:

    http://www.macromedia.com/devnet/mx/flash/articles/amfphp.html
    (flash remoting with php)

    another option is to use PHP to dynamically generate or manipulate the top image, i.e. change the image to match your link colors and stuff:
    http://ca3.php.net/gd

Leave a Reply