Ver Mensaje Individual
  #7 (permalink)  
Antiguo 18/04/2011, 11:15
hcbosch
 
Fecha de Ingreso: julio-2010
Mensajes: 64
Antigüedad: 13 años, 10 meses
Puntos: 1
Respuesta: cambiar el color de un numero dentro de una celda en una tabla

Mira el codigo que elaboré, y dime que tengo mal porque no me hace nada.
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.styletest{
color:#FF0000;}
-->
</style>


</head>

<body>
<?php
$datex= array (11,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,1 9,20,21,22,23);


?>
<table width="200" border="0">
<tr>
<td><?php
$redColor = "";
if ($datex[0]>10)$redColor = 'class="styletest"';
?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>