On my website i'm wanting the theme to change through different times throughout the year...
I understand this can be done manually with asp.net or javascript which link to different css files, however i'm wondering if there is way there a way so it will switch the styles automatically?
Any server side language can get the system date and determine which css file to load based on whatever periods of time you select. Javascript could also just as easily check the date on the client and pull the appropriate css file based on the date range you choose.
if(Date('n') > 9){ //between september and december
//echo your CSS here
} else if(Date('n') > 6){ //between june and september
//echo your CSS here
} else if(Date('n') > 3){ //between march and june
//echo your CSS here
} else { //between january and march
//echo your CSS here
}
I don't know how clear I can be since you haven't decided what language you wish to use to do it nor what the particulars are about your problem.
The code I posted above would work (with minor tweaks) for any C styled language (javascript, php, ASP.net, Java, etc). You just need to check for the specific dates first and get more general as you go along.
Bookmarks