Voy a utilizar el mismo codigo de antes
Código PHP:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
if(date("H:i:s")<="11:00:00") { //cuando sean menos o igual a las 11
$style ="background-color: #FFF; margin-top: 15px;";
}
elseif(date("H:i:s") >="12:00:00") { //cuando sean mas o igual a las 12
$style ="background-color: #444; margin-top: 15px;";
}
elseif(date("H:i:s")>="15:30:00") {//cuando sean mas o igual a las 15:30
$style ="background-color: #EEE; margin-top: 10px;";
}
else
{ //si no es ni una de las anteriores
$style ="background-color: #000; margin-top: 0px;";
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<div style="<?php echo $style; ?>">div de prueba</div>
</body>
</html>
Espero haber respondido a tu pregunta