Tema: Php y CSS
Ver Mensaje Individual
  #5 (permalink)  
Antiguo 15/05/2008, 12:08
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: Php y CSS

Como te comenta pateketrueke, lo debes de hacer así:
Código PHP:
<?php
header
"Content-type: text/css" );
?>
.fondo-docs {
    background-image: url(../pic/bg-docs-<?php echo mt_rand(1,5);
?>.png);
    background-repeat: no-repeat;
}
Luego lo que haces es poner el documento en tu html (en el head):
Código HTML:
<link rel="stylesheet" href="css.php" type="text/css"> 
Saludos.