Forum Moderators: not2easy
1) I call this the "hard way": Create 12 style sheets, each with the appropriate color scheme for a different month, then link to the proper sheet from within my php script depending on the date.
2) Being a php guy, I call this the "easier & better way" (though I'm afraid this is not possible): Load the appropriate month's color scheme in an array through php, link to one style sheet which calls the colors from the array.
Can php variables be called from a css? If not, is there another (more efficient) way to do this?
Thanks for your time and help from a true 'newbie'.
Jeff
You would use PHP to detect the month (not sure how) and then echo a variable. Set each stylesheet to a variable.
You could probably even have PHP request a file on your server with the same filename as the month (so when March is detected it would serve march.css).
You'll want to post this idea over in the PHP forums.
- John
try this thread
Server Side Scripting in CSS Files [webmasterworld.com]