How do I change a CSS bakground on refresh?

Posted on 2009-07-03
Last Modified: 2012-08-14
I have a drupal site located at and I want to be able for the background image on the front page to change when refreshed.  I have 10 or so images that are all the same size in my gallery, under the album Backgrounds (rotating).  Is there a way to call a php script in the CSS file that will randomly select an image from that album?  Or would it be simpler to call a file from a directory?

Question by:meinemitternacht
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

ID: 24771855
I think its easier to use php.
Check this out
LVL 17

Accepted Solution

selvol earned 500 total points
ID: 24771872

Author Comment

ID: 24773491
Thank you very much Selvol, hit it right on the money.  Mallcore, that's way over my head :)
Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.


Author Closing Comment

ID: 31599535
Thanks a ton!
LVL 17

Expert Comment

ID: 24776583
Glad to assist..
Yes, over our heads.....??

Author Comment

ID: 24776588
Over my head... means too complicated for me :)

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question