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

Retornemos al tema con el "XHTML 1.0 Strict", todos los estilos en la cabeza y sin errores en los códigos. Y lo que es más importante, sin la separación que tanta guerra ha dado a Astut
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">
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="es-es">
  3.     <head>
  4. <title>Kseso? jugando con css </title>
  5. <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
  6. <style type="text/css">
  7. * {
  8.     margin: 0;
  9.     padding: 0;
  10.     border: 0;
  11.     outline: 0;
  12.     font-weight: inherit;
  13.     font-style: inherit;
  14.     font-size: 100%;
  15.     font-family: inherit;
  16.     vertical-align: baseline;
  17. }
  18. body {
  19.   padding: 20px;
  20.   background: #000;
  21.   }
  22. table, tr, td {
  23.   table-layout: fixed;
  24.     border-collapse: collapse;
  25.     border-spacing: 0;
  26.     background:#cdcdcd;
  27.     overflow: hidden;
  28. }
  29. table {width:60px;} /*para ie7, sin ella ocupa el 100% del body*/
  30. tr {height:20px; float: left; clear:both;}
  31. td {text-align: center;}
  32. td img {
  33.   height:20px;
  34.   width:20px;}
  35.     </head>
  36.     <body>
  37.         <table cellpadding="0">
  38.             <tr>
  39.                 <td><img src="imagen.gif" alt="" /></td>
  40.                 <td><img src="imagen.gif" alt="" /></td>
  41.                 <td><img src="imagen.gif" alt="" /></td>
  42.             </tr>
  43.             <tr>
  44.                 <td><img src="imagen.gif" alt="" /></td>
  45.                 <td><img src="imagen.gif" alt="" /></td>
  46.                 <td><img src="imagen.gif" alt="" /></td>
  47.             </tr>
  48.             <tr>
  49.                 <td><img src="imagen.gif" alt="" /></td>
  50.                 <td><img src="imagen.gif" alt="" /></td>
  51.                 <td><img src="imagen.gif" alt="" /></td>
  52.             </tr>
  53.         </table>
  54.     </body>
  55. </html>
No estoy muy seguro de lo ortodoxo que habré sido en el uso de alguna propiedad en algún elemento (especialmente el "float: left; clear:both;" de las filas), pero... es efectivo
Espero que puedas adaptarlo a tu proyecto.

Un saludo.

P.D.: la imagen es el cuadrado verde utilizado por Deirdre en el #16.
__________________
Por una web con mucho estilo
+++ CUENTA ABANDONADA. ¿la quieres? +++

Última edición por kseso?; 13/07/2009 a las 11:53 Razón: añadir un detalle. Como siempre ie