View Full Version : Can it be set up for layout and CSS to change automatically?

Chelle the Cat
04-01-2009, 09:25 AM
I'm working on a new layout for a website that will utilize CSS and HTML.
My layout actually consists of four individual layouts that will represent Spring, Summer, Fall, and Winter. I'm trying to figure out however, if I will have to change the layout manually or if there is some way to set it up so that it will automatically change on a preset date.

For example: The date is March 19th, the layout displays the "Winter" layout for visitors. A visitor returns to the site the next day only this time the site displays the "Spring" layout because it's set to change on the 20th of March.

04-01-2009, 10:11 AM
A server side script that determines (by date) which CSS file to serve would be the way to do this.

This page (http://www.jlhaslip.trap17.com/samples/misc/time.php) serves a different background image by time-of-day for example. Use a similar approach to change the css file by date would be easy enough to arrange.

Chelle the Cat
04-01-2009, 09:12 PM
Okay, well... that answers that it can be done...

I have absolutely no experience with server side scripts what-so-ever sadly.

Is there perhaps another way to achieve this? Or is using some kind of SSS the only way to achieve this effect?

04-02-2009, 10:00 AM

This is a javascript solution, but again it is using different time periods of the day (however it uses the user's timezone). Would need tweaking to work with the seasons.

04-02-2009, 06:25 PM
A server side solution would be best. You can ask in the PHP forum for a bit of help if you get stuck. Give it a try.

Chelle the Cat
04-02-2009, 09:36 PM
Thanks, but due to the nature of the project and time line for it I really don't have time to learn a whole new coding language just to get this done (and I know absolutely nothing about working in PhP at this point in time). If it comes down to that being the only reliable way, I will have to hire out for the work to be done unfortunately.