Hi I have a header image on my site, but have 3 different styles - 1 for xmas, 1 for easter and another one to display at other times of the year! What i'm wanting to know without having to either rename the header image file and upload or change the css file for those 3 times of the year, can css do this by itself at all? ie: in december, it will show the xmas header, at easter, it will show the easter header (dependant obviously on dates) and the rest of the year display just the normal header! Here is the code in the css: #header { background-image: url('site-header.jpg'); width: 800px; height: 100px; } and here is the code in the php/html page: <div id="header"></div> and by going to enthusiasts guide to Brisbane Transport, you'll see what i mean, and for the header images, they are: http://btbuses.info/site-header%20XMAS.jpg http://btbuses.info/site-header%20EASTER.jpg http://btbuses.info/site-header.jpg Your suggestions are most welcomed. Thankyou...
CSS has no method for detecting the date, or making decisions based on the date. You can either write a JavaScript that detects the date, and changes the image, or handle it with your server scripting language.
Either or, doesn't really matter, although php preferred if possible? (sorry for the delay, for some reason never received notification of this thread being responded too).
Although changing the CSS file isn't so bad, three times a year? Changing the single CSS file of course changes all your pages. I have a page, still friggin sitting on hold, where I have a handful of images that the boss could change if he wanted too... all the images are in the same image file as the rest of the site's images, and the name of the current one is sitting in the CSS: background: url(image.gif) center center no-repeat; and image.gif gets changed to whatever, so long as it's already in the file. This might ultimately be easier than having a pile of scripts sitting on the server. Though for some people it's harder to get to the CSS file, in which case, the scripts can fully automate it.