Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/09/2009, 13:48
juano_dhw
 
Fecha de Ingreso: septiembre-2009
Mensajes: 1
Antigüedad: 14 años, 7 meses
Puntos: 0
Tabla con cabecera fija

Hola como estan soy nuev o en el foro deseo q me ayuden con el problema que tengo, lo que pasa tengo una tabla html con cabecera fija y el cuerpo con scroll el problema esta en el firefox cuando solo tiene una linea en el cuerpo de la tabla ocupa todo el espacio dado al cuerpo. Aqui les dejo mi codigo para ver si me pueden ayudar.
El problema esta en el firefox en el explorer si funk; saludos gracias x la respuesta
Código HTML:
 <style type="text/css">
 div.fixedHeaderTable {
     position: relative;
 }
 div.fixedHeaderTable table {
     width:100%;
 }
 div.fixedHeaderTable tbody {
     height: 200px;
    overflow-y: auto;
     overflow-x: hidden;
 }
 div.fixedHeaderTable table th {
     background-color:#CCCCCC;font-weight:bold
 }
 div.fixedHeaderTable table td {
     background-color:#EEEEEE
 }
 div.fixedHeaderTable thead td, div.fixedHeaderTable thead th {
     position:relative;
 }
 
/* IE7 hacks */
 div.fixedHeaderTable {
     *position: relative;
     *height: 200px;
     *overflow-y: scroll;
     *overflow-x: hidden;
     *padding-right:16px;
 }
 
 div.fixedHeaderTable thead tr {
     *position: relative;
     _position: absolute;
    *top: expression(this.offsetParent.scrollTop-2);
     *background:none;
     background-color:#FFFFFF
 }
  
 div.fixedHeaderTable tbody {
     *height: auto;
     *position:absolute;
     *top:50px;   
 }

 /* IE6 hacks */
 div.fixedHeaderTable {
     _width:expression(this.offsetParent.clientWidth-20);
     _overflow: auto;
     _overflow-y: scroll;
     _overflow-x: hidden;
 }
 div.fixedHeaderTable thead tr {
     _position: relative
 }
 </style>

<div class="fixedHeaderTable">
   <table>
      <thead>
      	<tr><th>uno</th><th>dos</th><th>tres</th></tr>
      </thead>
      <tbody>
         <tr><td>aaaa</td><td>bbbb</td><td>cccc</td></tr>
         <tr><td>aaaa</td><td>bbbb</td><td>cccc</td></tr>
         <tr><td>aaaa</td><td>bbbb</td><td>cccc</td></tr>
         <tr><td>aaaa</td><td>bbbb</td><td>cccc</td></tr>

      </tbody>
   </table>       
</div>