Here's the best solution:
dont do it.
It sounds very unnecessary.
Printable View
Here's the best solution:
dont do it.
It sounds very unnecessary.
Hey, additional solution since im more awake now. Just use the php with the css file. Simply make your css file a .php, add my code to it, but inline with your other css and it should work.
Additionall at the top of the doucment you may wana set header to make sure browser recognises it as css file
aka at top of css page have
<?php header('Content-type: text/css'); ?>
<script>
var now = new Date();
var hours = now.getHours();
var psj=0;
//18-19 night
if (hours > 17 && hours < 20){
document.write('<body bgcolor="orange" text="#FFFFFF">')
}
//20-21 night
if (hours > 19 && hours < 22){
document.write('<body bgcolor="orangered" text="#FFFFFF">')
}
//22-4 night
if (hours > 21 || hours < 5){
document.write('<body bgcolor="black" text="#FFFFFF">')
}
//9-17 day
if (hours > 8 && hours < 18){
document.write('<body bgcolor="deepskyblue" text="#FFFFFF">')
}
//7-8 day
if (hours > 6 && hours < 9){
document.write('<body bgcolor="skyblue" text="#FFFFFF">')
}
//5-6 day
if (hours > 4 && hours < 7){
document.write('<body bgcolor="steelblue" text="#FFFFFF">')
}
//-->
</script>