Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/01/2010, 18:22
Avatar de destor77
destor77
 
Fecha de Ingreso: noviembre-2004
Ubicación: Gálvez, Santa Fe, Argentina
Mensajes: 2.654
Antigüedad: 19 años, 5 meses
Puntos: 43
Respuesta: alinear textos, imagen en tabla

este es el codigo de la tabla la misma esta dentro de un formulario:
Código HTML:
Ver original
  1. <?php
  2.             if($paginadorImagen){
  3.             ?>  
  4.             <div class="portlet">
  5.                 <div class="portlet-header">Fotos de la Galería</div>        
  6.                 <div class="portlet-content">  
  7.                                    
  8.                   <table cellpadding="0" cellspacing="0" summary="" >
  9.                         <thead>
  10.                             <tr>
  11.                                 <th>#</th>
  12.                                 <th>Imagen</th>
  13.                                 <th>&nbsp;</th>
  14.                             </tr>
  15.                          </thead>
  16.                             <?
  17.                             $num_fila = 1;
  18.                             $info = $paginadorImagen->superArray();
  19.                             $i=1 + ( $info['porPagina'] * ( $info['numEstaPagina'] - 1 ) );
  20.                             while ($fotos=$paginadorImagen->fetchResultado()){                      
  21.                                 $j++;
  22.                                 if ($num_fila%2!=0){
  23.                                     $class="class='odd'";
  24.                                     }
  25.                                 else{
  26.                                     $class="";
  27.                                 }?>
  28.                                 <tr <? echo $class;?> valign="top">
  29.                                     <td valign="top"><p><? echo $fotos['id'];?></p></td>                              
  30.                                     <td valign="top"><img src="<? echo str_replace('D:/xampp/htdocs/ampa','http://'.$_SERVER['HTTP_HOST'].'/'.$ubicacion[1],$fotos['ruta_thumb']);?>" alt=""/></td>                                
  31.                                     <td class="action" valign="top">                                       
  32.                                         <a class="delete" onclick="if (ask()) window.location='index.php?controlador=galerias&amp;accion=borrarImagen&amp;id=<? echo $fotos['id'];?>&amp;galeria=<?php echo $datos->id;?>'" href="#" title="Borrar Imagen">
  33.                                             Borrar
  34.                                         </a>                                
  35.                                     </td>
  36.                                 </tr>
  37.                                 <?php
  38.                                 $num_fila++;
  39.                             }?>
  40.                             <tr><td colspan="6">&nbsp;</td></tr>
  41.                     </table>
  42.                     <? echo "<div id='navigation'>".$paginadorImagen->fetchNavegacion()."</div>";?>  
  43.                              
  44.                 </div>
  45.             </div>
  46.             <?php
  47.             }
  48.             ?>

por las dudas pego el css
Código CSS:
Ver original
  1. #main table {
  2.     border: 1px solid #ddd;
  3.     width: 680px;
  4.     margin: 0px 0px 20px 0px;
  5. }
  6.  
  7. #main table thead th{
  8.     background: #cccccc url(smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold;
  9.     padding: 0px 0px 0px 20px;
  10.     height: 29px;
  11.     line-height: 29px;
  12.     border-bottom: 1px solid #ddd;
  13. }
  14.  
  15. #main table tr td {
  16.     background: #f6f6f6;
  17.     padding: 0px 0px 0px 15px;
  18.     height: 29px;
  19.     line-height: 29px;
  20.     border-bottom: 1px solid #ddd;
  21.     text-align: left;
  22. }
  23.  
  24.  
  25.  
  26. #main table tr.odd td {
  27.     background: #fbfbfb;
  28. }
  29.  
  30. #main table tr:hover td { background: #fdfcf6; }
  31.  
  32. #main table .action {
  33.     text-align: right;
  34.     padding: 0 20px 0 10px;
  35. }
  36.  
  37.  
  38.  
  39. #main table tr .action a { margin: 0 0 0 10px; text-decoration: none; color: #9b9b9b !important; }
  40. #main table tr:hover .action .edit { color: #c5a059; }
  41. #main table tr:hover .action .delete { color: #a02b2b; }
  42. #main table tr:hover .action .view { color: #55a34a; }
  43.  
  44. #main table tr:hover .action a:hover { text-decoration: underline; }

salu2