Foros del Web » Creando para Internet » HTML »

agregar color a lineas de tabla

Estas en el tema de agregar color a lineas de tabla en el foro de HTML en Foros del Web. hola a todos, estoy imprimiendo unos datos en php mediante una tabla que arme en html como le agrego color a estas lineas? @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); ...
  #1 (permalink)  
Antiguo 28/11/2012, 07:44
Avatar de mager3  
Fecha de Ingreso: junio-2012
Ubicación: Medellin
Mensajes: 318
Antigüedad: 11 años, 10 meses
Puntos: 4
Información agregar color a lineas de tabla

hola a todos, estoy imprimiendo unos datos en php mediante una tabla que arme en html

como le agrego color a estas lineas?

Código HTML:
Ver original
  1. echo"<tr><td width=\"3%\"><font face=\"verdana\"><div align=center><a href=\"meco_2.php?factura='".$inquiry["0"]."'\"> Desmarcar</a></td>";
  2.  
  3. echo "<td width=\"10%\"><font face=\"verdana\">" . $inquiry["0"] . "</font></td></tr>";
  #2 (permalink)  
Antiguo 28/11/2012, 12:17
Avatar de emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: agregar color a lineas de tabla

algunas variantes
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>titulo</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <style type="text/css">
  7. /*<![CDATA[*/
  8. #tabla1 tr{
  9. border: solid red 1px;
  10. }
  11. #tabla2 tr{
  12. border: solid green 2px;
  13. }
  14. #tabla3 tr:nth-child(odd) {border: solid 1px #0D324D;}
  15. #tabla3 tr:nth-child(even) {border: solid 1px #00FF00;}
  16. /*]]>*/
  17. </head>
  18. <table id="tabla1" border="1" cellpadding="3" cellspacing="3" rules="rows" frame="box">
  19. <tr><td>AAAAAAA</td><td>BBBBBBBBB</td></tr>
  20. <tr><td>CCCCCCC</td><td>DDDDDDD</td></tr>
  21. <hr />
  22. <table id="tabla2" border="1" cellpadding="3" cellspacing="1" rules="rows" frame="box">
  23. <tr><td>AAAAAAA</td></tr>
  24. <tr><td>CCCCCCC</td></tr>
  25. <hr />
  26. <table id="tabla3" border="1" cellpadding="3" cellspacing="1" rules="rows" frame="box">
  27. <tr><td>AAAAAAA</td><td>BBBBBBBBB</td></tr>
  28. <tr><td>CCCCCCC</td><td>DDDDDDD</td></tr>
  29. <tr><td>EEEEEEEE</td><td>GGGGGGGGG</td></tr>
  30. <tr><td>HHHHHHHH</td><td>IIIIIIIIIIIIIIIII</td></tr>
  31. </body>
  32. </html>

Y te sugiero descartes el uso de font y de meter un div en la celda para para centrar el texto, usa css, propiedades font-family; font-size y text-align para las celdas directamente

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.

Etiquetas: color, tablas
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:55.