Dimensione tabella CSS
Larghezza e altezza del tavolo
La larghezza e l'altezza di una tabella sono definite dalle proprietà width
e height
.
L'esempio seguente imposta la larghezza della tabella su 100% e l'altezza degli elementi <th> su 70px:
Esempio
table
{
width: 100%;
}
th
{
height: 70px;
}
Per creare una tabella che dovrebbe occupare solo metà della pagina, utilizzare width: 50%
:
Esempio
table
{
width: 50%;
}