Good morning,
I want to vertically align the text of a table that is being 'printed' by means of a .php by ajax, I have tried to put the attribute to the td tags with:
valign="center" (I read that it no longer works in HTML5, therefore it is assumed that that's why it did not work)
I tried to put the bootstrap class (as I read in link )
class="align-middle" class="align-text-middle"
I tried with css
td { vertical-align: center: }
and also
td { vertical-align: middle; }
Nothing works, what if it serves is to put the attribute to the td as align="center" that does it horizontally, currently the code I have it as I leave it down after making a query mySql, I wonder if it is not working Why does the table come from a php and is not reflected as such in the .html, that has to do?
<?php
while($row=mysqli_fetch_array($result))
{
echo '<tr>';
echo '<td align="center">'.$row['id'] . '</td>';
echo '<td align="center">'.$row['tipo_solicitud'] . '</td>';
echo '<td align="center">'.$row['nombre'] . '</td>';
echo '<td align="center">'.$row['celular'] . '</td>';
echo '<td align="center">'.$row['direccion'] . '</td>';
echo '<td align="center">'.$row['email'] . '</td>';
echo '<td align="center">'.$row['comentarios'].'</td>';
//se pone // para indicar que es una ruta nueva, si no toma la carpeta actual y concatena con la ruta en MySql
echo '<td align="center"><a href="//'.$row['ruta_foto1'].'" target="_blank">Ver foto1</a></td>';
echo '<td align="center"><a href="//'.$row['ruta_foto2'].'" target="_blank">Ver foto2</a></td>';
echo '<td align="center" bgcolor="#dd425c">' . $row['estado'] . '</td>';
echo '<td align="center"><button id="'.$row['id'].'" onclick="eliminar_solicitud_revision_tecnica_estado_solicitado(this)" class="btn btn-danger">Eliminar solicitud</button></td>';
echo '<td align="center"><button id="'.$row['id'].'" onclick="confirmar_visita(this)" class="btn btn-default">Confirmar visita</button></td>';
echo '</tr>';
}
?>