Ver Mensaje Individual
  #8 (permalink)  
Antiguo 16/05/2008, 11:04
Avatar de the_web_saint
the_web_saint
 
Fecha de Ingreso: mayo-2008
Ubicación: localhost/tierra/america/panama
Mensajes: 1.229
Antigüedad: 16 años
Puntos: 43
Respuesta: php y css dinamico

Buenas he tenido el mismo problema que el compañero. estoy tratando de usar ccs dinamico pero no me funciona.

el codigo que tengo para declarar el ccs_php en el php es:

Cita:
<link id="sampleFormCSS" media="screen" href="imgs/sample_form_css.php" rel="stylesheet" type="text/css" />
tengo una funcion en javascript que llama al css pero enviandole valores que tomo de unos input, la funcion es esta:

Cita:
function updatePreview()
{
// update the preview window (with the selected colors)
document.getElementById('sampleFormCSS').setAttrib ute('href','imgs/sample_form_css.php?rander=' + Math.random() + '&bgcolor=' + document.getElementById('formBgColor').getAttribut e('value') + '&headerbgcolor=' + document.getElementById('formHeaderBgColor').getAt tribute('value') + '&headerfontcolor=' + document.getElementById('formFontColor').getAttrib ute('value'));
}
y el codigo del css es el siguiente:

Cita:
<?php header("Content-type: text/css"); ?>
#formSampleBackground
{
background-color: #<?php echo $_GET['bgcolor'] ?>;
border: 1px;
border-style: solid;
}


#mainForm
{
position: relative;
border: 1px;
border-style: solid;
margin: 0 auto;
text-align: left;
width: 70%;
background-color: #ffffff;
}

ul.mainForm
{
list-style-type: none;
font-family: Tahoma, Arial, Verdana, sans-serif;
font-size:15px;
}

li.mainForm
{
padding-bottom: 10px;
}



#formHeaderStyle
{
position: relative;
width: 100%;
background-color: #<?php echo $_GET['headerbgcolor'] ;?>
margin:0 0 0 0;
padding-bottom: 10px;
}

p.formHeaderStyle
{
text-align: right;
margin:0 0 0 0;
font-family: Tahoma, Arial, Verdana, sans-serif;
font-weight:normal;
color: #ffffff;
font-size:25px;
position:relative;
left:-5px;
top:4px;
letter-spacing: 2px;
}



#formInfoStyle
{
position: relative;
width: 100%;
margin:0 0 0 0;
}

h3.formInfoStyle
{
text-align: left;
margin:0 0 0 0;
font-family: Tahoma, Arial, Verdana, sans-serif;
font-weight:normal;
font-size:20px;
position:relative;
left:20px;
top:0px;
letter-spacing: 1px;
line-height:150%;
color: #;
}


p.formInfoStyle
{
text-align: left;
margin:0 0 0 0;
font-family: Tahoma, Arial, Verdana, sans-serif;
font-weight:normal;
font-size:12px;
position:relative;
left:20px;
top:0px;
color: #;
}



h4.formInfoStyle
{
text-align: left;
margin:0 0 0 0;
font-family: Tahoma, Arial, Verdana, sans-serif;
font-weight:normal;
font-size:12px;
position:relative;
left:20px;
top:0px;
color: #<?php echo $_GET['headerfontcolor'];?>;
}

#formFields
{
position: relative;
width: 100%;
background-color: #ffffff;
margin:0 0 0 0;

}

label.formFieldQuestion
{
line-height:125%;
padding:0 4px 1px 0;
border:none;
display:block;
font-size:95%;
font-weight:bold;
}

label.formFieldOption
{
font-size:90%;
display:block;
line-height:1.0em;
margin:-19px 0 0 25px;
padding:4px 0 5px 0;
width:90%;
}



input.formFieldStyle
{
display:block;
line-height:1.4em;
margin:8px 0 0 3px;
width:13px;
height:13px;
}

No hace nada, me deja las capas sin colores.
No c que podria estar pasando, por favor ayudenme!

Gracias