Created
September 19, 2020 08:00
-
-
Save simongcc/d7904e0a97525df10b73ea547d1b70e4 to your computer and use it in GitHub Desktop.
CSS Table example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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