Foros del Web » Creando para Internet » CSS »

[SOLUCIONADO] Tabla responsiva.

Estas en el tema de Tabla responsiva. en el foro de CSS en Foros del Web. ¿Algún consejo o ayuda de cómo convertir una tabla dinámica con un WHILE ----> a algo responsivo? estoy usando bootstrap por medio de wordpress. éste ...
  #1 (permalink)  
Antiguo 07/02/2018, 12:34
pako1707
Invitado
 
Mensajes: n/a
Puntos:
Tabla responsiva.

¿Algún consejo o ayuda de cómo convertir una tabla dinámica con un WHILE
----> a algo responsivo? estoy usando bootstrap por medio de wordpress.

éste es mi code:

Código PHP:

<html>

<table>
    <tr>
        <!--<th>ID</th>-->
        <th>MOVIMIENTO</th>
        <th>FINALIZAR</th>
        <th>QUIÉN</th>
        <th>FECHA</th>
        <th>EXISTENCIA [LLA]</th>
        <th>DOC. T</th>
        <th>DOC. S</th>
        <th>CANTIDAD</th>
        <th># PARTE</th>
        <th>BO</th>
        <th>SUC</th>
        <th>FACTURA</th>
        <th>ENVIADA [FAC]</th>
        <th>MANUAL</th>
        <th>ADD MANUAL</th>
        <th>CDF</th>
        <th>NOTAS</th>
    </tr>

<?php

$sql  
"SELECT... ";
$sqlcount "SELECT... ";

$result  $conn->query($sql);
$result2 $conn->query($sqlcount);
$numero mysqli_num_rows($result);

if (
$result->num_rows 0) {
    
// output data of each row
        
    
while($row $result->fetch_assoc()) {

        
"<input type='hidden' name='id[]' value="$row["id"]."></input>";

?>

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"  id="boxes">

    <tr>

        <td><?php echo $row["movimiento"?></td>
        
        <td><input type="hidden" name="g_check[]" value="<?php echo $row["id"?>" checked /> 
            
        <input type="submit" name="procesar" value="Finalizar" class="button" /></td>

        <td><a href="/members/<?php echo $row["userlog"]?>" target="_blank"><?php echo $row["userlog"?>             </td>
        <td><?php echo $row["fecha"?>             </td>
        <td><?php echo $row["existencia"?>        </td>
        <td><?php echo $row["documentoT"?>      </td>
        <td><?php echo $row["documentoS"?>      </td>
        <td><?php echo $row["cantidad"?>          </td>
        <td><?php echo $row["noparte"?>           </td>
        <td><?php echo $row["bo"?>                </td>
        <td><?php echo $row["suc"?>               </td>
        <td><?php echo $row["factura"?>           </td>
        <td><?php echo $row["facEnviada"?>        </td>
        <td><?php echo $row["manual"?>            </td>
        <td><?php echo $row["addmanual"?>         </td>
        <td><?php echo $row["cfd"?>               </td>
        <td><?php echo $row["notas"?>             </td>

    </tr>

</form>

<div>

<?php
}
if(isset(
$_POST['procesar'])){
$opciones $_POST['g_check'];
 
// Con esto te imprime cuales opciones se seleccionaron 
if(empty($opciones)){
echo 
"<p>No hay opciones seleccionadas.</p>\n";
}else{
$totalSeleccionados count($opciones);

for(
$i=0$i $totalSeleccionados$i++){

echo 
"Aprobado con éxito";
//echo ("Se aprobó el: ".$opciones[$i] . " ");

    
$sqlaut "UPDATE...";

    
$result $conn->query($sqlaut);

$url='#';
echo 
'<meta http-equiv=refresh content="1; '.$url.'">';

}
echo 
"<p></p>";
}
 
// cierre post procesar
}   

if (
$numero 1) {
    echo 
"<center><h2>No hay pendientes.</h2></center><br/>";
}
else
{
    echo 
"<center><h2>Hay ".$numero." por finalizar.</h2></center><br/>";
}
$conn->close();



?>    
</table>

</html>
Les agradezco cualquier apoyo.
  #2 (permalink)  
Antiguo 07/02/2018, 12:46
Avatar de DragonX
Colaborador
 
Fecha de Ingreso: mayo-2002
Ubicación: Funkyland
Mensajes: 8.433
Antigüedad: 21 años, 10 meses
Puntos: 177
Respuesta: Tabla responsiva.

probaste con esto: https://v4-alpha.getbootstrap.com/co...ponsive-tables
Slds.-
__________________
Desarrollos dosLotos
Calendario Maya, Meditación, Osho
  #3 (permalink)  
Antiguo 13/02/2018, 17:02
pako1707
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Tabla responsiva.

Muchas gracias DragonX lo que hice fue meter la tabla en un <DIV> con <STYLE> overflow-y:AUTO; con CSS, e hizo que se pudiera deslizar la tabla sin perder el diseño del portal.

RESUELTO.

Etiquetas: tabla
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 16:32.