View Full Version : load a different image on every page load

11-04-2011, 04:22 AM
How can I display a different background image every time my page loads? These images will be wider/taller than the viewing area when being viewed with smaller screen resolutions, so I need the images to be centered vertically/horizontally across the browser window, with the center of the images being in the center of the viewing area, no matter which screen resolution the visitor has..

Normally for just a single bg image I'd use:

background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;

But how can I achieve this same effect for multiple, randomly picked, bg images?

11-04-2011, 11:37 AM
I see you have posted 36 times but have thanked no one... I could explain how you can do this if you can explain that.