Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/09/2010, 03:45
iestudioweb
 
Fecha de Ingreso: septiembre-2010
Mensajes: 2
Antigüedad: 13 años, 8 meses
Puntos: 0
Dar formato a salida de un código php

Hola,

En primer lugar no se si lo tendría que poner aquí este tema o en PHP pero al ser estilo supongo que aqui.

Estoy leyendo registros de una tabla de base de datos con php, pero quiero darle formato a la salida. He creado un estilo pero sólo me lo coge en los títulos pero no en las salidas, no sé si tendré que especificar más o cómo.

Os pongo el código para ver si alguien me puede ayudar.



.agenda {
color: #cd5931;
font-size:9px;
font-family:Arial, Helvetica, sans-serif;
}




<body alink= "#999" vlink="#999999">
....

</table> <table width="300" height="257" border="0" align="right" cellspacing="0">
<tr>
<td width="395" height="33" colspan="2">&nbsp;</td>
</tr>
<tr>
<!-- AQUI EMPIEZA EL CÓDIGO PARA MOSTRAR LA AGENDA-->

</tr>
<tr>

<?php
//Conexion con la base
mysql_connect("localhost","juanan","slamed");

//selección de la base de datos con la que vamos a trabajar
mysql_select_db("juanan_bd");

//Ejecutamos la sentencia SQL
$result=mysql_query("select comentario, fecha from agenda");
?>
<table class="agenda" align="left" width="350">
<tr>
<th align="left">Fecha</th>
<th align="left">Comentario</th>
</tr>

<?php
//Mostramos los registros
while ($row=mysql_fetch_array($result))
{
echo '<td class="agenda">'.$row["fecha"].'</td></tr>';
echo '<tr><td class="agenda">-'.$row["comentario"].'</td>';
}
mysql_free_result($result)
?>
</table>
<tr>
<td width="617" height="20" background="imagenes/inf.gif"><blockquote>
<p>Copyright &copy; juananherrera.com :: 2010 | Aviso legal | Diseño y desarrollo <a href="http://www.iestudioweb.com">iestudioweb </a>| <a href="identificacion.php">Login</a></p>
</blockquote></td>
<td width="141" background="imagenes/inf.gif"><a href="www.facebook.com/juananherrera"><img src="imagenes/facebook.gif" alt="facebook" width="25" height="25" border="0" /></a><a href="www.twitter.com/juananherrera"><img src="imagenes/twitter.gif" alt="Twitter" width="25" height="24" border="0" /></a><a href="www.myspace.com/juananherrera"><img src="imagenes/myspace.gif" alt="Myspace" width="80" height="25" border="0" /></a></td>
</tr>

</table>
</td>
<td width="10">&nbsp; </td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>


Lo que necesito concretamente es que el texto que me muestre de salida me de un tamaño inferior, es que le ponga el tamaño que le ponga no le afecta, asi que supongo que ahí es donde está el error.

Un saludo, muchas gracias de antemano.