Boas, estou a fazer uma tabela e a preenchê-la com valores recebidos de uma base de dados. O problema é que o tamanho das células adaptam-se ao valor do seu conteudo em vez de manterem o valor que defini para eles. Alguem tem alguma solução?
O código da tabela é o seguinte :
table {
max-width: 400px;
}
td,tr{
width: 33px;
border: 1px solid red;
}
</style>
</head>
<body>
<table>
<tr>
<th>Tipo</th>
<th>Provisoes</th>
<th>Pagamentos</th>
<th>Acrescimos</th>
<th>Liquidacoes</th>
<th>Saldo</th>
<th>Ac_Provisoes</th>
<th>Ac_Pagamento</th>
<th>Ac_Acrescimos</th>
<th>Ac_Liquidacoes</th>
<th>Ac_Saldo</th>
</tr>
<?php while ($row = odbc_fetch_array($query)) {
?>
<tr>
<td><?= $row['Tipo'] ?></td>
<td><?= $row['Provisoes'] ?></td>
<td><?= $row['Pagamentos'] ?></td>
<td><?= $row['Acrescimos'] ?></td>
<td><?= $row['Liquidacoes'] ?></td>
<td><?= $row['Saldo'] ?></td>
<td><?= $row['Ac_Provisoes'] ?></td>
<td><?= $row['Ac_Pagamento'] ?></td>
<td><?= $row['Ac_Acrescimos'] ?></td>
<td><?= $row['Ac_Liquidacoes'] ?></td>
<td><?= $row['Ac_Saldo'] ?></td>
</tr>
<?php } ?>
</table>