Good people,
I have a table like this:
The"thead" part where it says Dorsal, Name ... etc is a table (table1) and the rest is another table (table2), basically they are two tables that I tried to do with them if they aligned using width but it does not work . What I wanted was that both table1 and table2 aligned, leaving their "partitions" in the purple scratches. Can anyone help me figure this out? I leave below the code maybe it is easier to understand (although the data are from the database I will get into it). Now if someone can tell me how I can hide the scrollbar but anyway I can scroll, I would thank
echo "<div id='tabelaN'>
<div id='tabela1'>
<table>
<tr>
<td>Dorsal</td>
<td>Nome</td>
<td>Equipa</td>
<td>Prova</td>
<td>Almoço</td>
</tr>
</table>
</div>";
echo "
<div style='width: 550px; height: 150px; overflow-y: scroll; overflow-x:hidden' id='tabela2'>
<table >";
while($row = mysqli_fetch_array($result)){
echo "<tr >";
echo "<td>" . $row['dorsal'] . "</td>";
echo "<td>" . $row['nome'] . "</td>";
echo "<td>" . $row['equipa'] . "</td>";
echo "<td>" . $row['categoria'] . "</td>";
if($row['almoco'] == 1)
echo "<td>Sim</td>";
else
echo "<td>Não</td>";
echo "</tr>";
}
echo "</table></div></div>";
PS. This is not what I did. I am an intern and have been asked to make changes.