How TO - Full-width Table


Learn how to create a full-width table with CSS.


A table that does not have a set width:

Firstname Lastname Age
Jill Smith 50
Eve Jackson 94
John Doe 80

A full-width table:

Firstname Lastname Age
Jill Smith 50
Eve Jackson 94
John Doe 80

How To Create a Full-width Table

To create a full-width table, use width: 100%:

Example

table {
  width: 100%;
}
Try it Yourself »

Tip: Go to our CSS Tables Tutorial to learn more about how to style tables. 


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.