Styling tables - Learn web development | MDN

PHOTO EMBED

Sat Jul 16 2022 08:06:52 GMT+0000 (Coordinated Universal Time)

Saved by @BeadNOff #tablestylecss #csstablestyle #table

/* spacing */

table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  border: 3px solid purple;
}

thead th:nth-child(1) {
  width: 30%;
}

thead th:nth-child(2) {
  width: 20%;
}

thead th:nth-child(3) {
  width: 15%;
}

thead th:nth-child(4) {
  width: 35%;
}

th, td {
  padding: 20px;
}
content_copyCOPY

https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Styling_tables