Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CSS Table example
.table {
// display: table;
width: 100%;
background: red;
.tbl-col-group {
display: table-column-group;
.tbl-col {
display: table-column;
&:nth-child(1) {
width: 20%;
}
&:nth-child(2) {
width: 15%;
}
&:nth-child(3) {
width: 15%;
}
&:nth-child(5) {
width: 14%;
}
}
}
.tbl-header {
display: table-header-group;
.tbl-row {
display: table-row;
.tbl-cell {
display: table-cell;
font-weight: 700;
}
}
}
.tbl-body {
display: table-row-group;
.tbl-row {
display: table-row;
.tbl-cell {
display: table-cell;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment