Ver Mensaje Individual
  #18 (permalink)  
Antiguo 13/07/2009, 07:46
kseso?
Colaborador
 
Fecha de Ingreso: junio-2007
Mensajes: 5.798
Antigüedad: 16 años, 10 meses
Puntos: 539
Respuesta: Celdas de tabla a 24px imagenes a 24px no caben

Hola Astut.

Después de andar dándole alguna vuelta al tema de las tablas (que reconozco mi desconocimiento de ellas), te comparto lo siguiente, tomando como base el código:

Código html:
Ver original
  1.         <table width="60" border="0" cellspacing="0" cellpadding="0" height="60">
  2.             <tr height="20">
  3.                 <td width="20" height="20"><img src="imagen.gif" alt="" height="20" width="20" align="middle" border="0"></td>
  4.                 <td width="20" height="20"><img src="imagen.gif" alt="" height="20" width="20" align="middle" border="0"></td>
  5.                 <td width="20" height="20"><img src="imagen.gif" alt="" height="20" width="20" align="middle" border="0"></td>
  6.             </tr>
  7.             <tr height="20">
  8.                 <td width="20" height="20"><img src="imagen.gif" alt="" height="20" width="20" align="middle" border="0"></td>
  9.                 <td width="20" height="20"><img src="imagen.gif" alt="" height="20" width="20" align="middle" border="0"></td>
  10.                 <td width="20" height="20"><img src="imagen.gif" alt="" height="20" width="20" align="middle" border="0"></td>
  11.             </tr>
  12.             <tr height="20">
  13.                 <td width="20" height="20"><img src="imagen.gif" alt="" height="20" width="20" align="middle" border="0"></td>
  14.                 <td width="20" height="20"><img src="imagen.gif" alt="" height="20" width="20" align="middle" border="0"></td>
  15.                 <td width="20" height="20"><img src="imagen.gif" alt="" height="20" width="20" align="middle" border="0"></td>
  16.             </tr>
  17.         </table>
  18.     </body>

Deliberadamente descabezado

Pues lo que he podido observar es que el espacio aparece en función del doctype.
Si el documento comienza por:
Código html:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
no surgen espacios en blanco.
Si el doctype es
Código html:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
ya tenemos espacio entre las filas, y la única forma que he hallado de eliminarlo es añadiendo el estilo:
Código css:
Ver original
  1. tr {float: left; clear:both;}
conjuntamente con este último doctype.

Intentaré alguna cosilla más y te cuento.

Un saludo.

Edito:
No tomar en cuenta los errores tales como no cerrar los tags, los estilos en el cuerpo, etc. Son pruebas.
__________________
Por una web con mucho estilo
+++ CUENTA ABANDONADA. ¿la quieres? +++

Última edición por kseso?; 13/07/2009 a las 08:02