Tim Snadden wrote: > On 29/07/2009, at 10:40 PM, Andzia wrote: > >> Hello, I have this website almost finished: >> http://klikerlab.pl/ >> and I had an idea, that maybe I could make it more active, by >> changing the >> image to the left, each day. Can it be done with css? For example, >> that the >> chicken would be displayed on Monday, something else on Tuesday, >> etc.... or >> should I use a different method? > > You can't use CSS for this. You will need to do it with either a > server side language (e.g. php) or with javascript. You can still use > CSS to the extent that you could create classes called mon, tues, wed > etc. and then use your server side language to set this class based on > the current day.
Or you could just have your CSS call one standard image name (todaysimage.jpg), while you have a script on your server run once a day, get the day of the week from the server's clock, copy "tuesday.jpg" to "todaysimage.jpg", then just wait until the next day when it would copy "wednesday.jpg" to "todaysimage.jpg". Wouldn't have to change anything in your CSS or HTML at all. -- David gn...@hawaii.rr.com authenticity, honesty, community ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/