MEMEPh. ideas that are worth sharing...

CSS Table Size


Table Width and Height

The width and height of a table are defined by the width and height properties.

The example below sets the width of the table to 100%, and the height of the <th> elements to 70px:

Firstname Lastname Savings
Peter Griffin $100
Lois Griffin $150
Joe Swanson $300

Example

table {
  width: 100%;
}

th {
  height: 70px;
}

Try it Yourself »

To create a table that should only span half the page, use width: 50%:

Firstname Lastname Savings
Peter Griffin $100
Lois Griffin $150
Joe Swanson $300

Example

table {
  width: 50%;
}

Try it Yourself »