Created
July 22, 2020 15:33
-
-
Save ItsASine/611e7643bd2c344141f6392fe8f55f7f to your computer and use it in GitHub Desktop.
table-css
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
.styled-table { | |
border-collapse: collapse; | |
margin: 25px 0; | |
font-size: 0.9em; | |
font-family: sans-serif; | |
min-width: 400px; | |
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15); | |
} | |
.styled-table thead tr { | |
background-color: #009879; | |
color: #ffffff; | |
text-align: left; | |
} | |
.styled-table th, | |
.styled-table td { | |
padding: 12px 15px; | |
} | |
.styled-table tbody tr { | |
border-bottom: thin solid #dddddd; | |
} | |
.styled-table tbody tr:nth-of-type(even) { | |
background-color: #f3f3f3; | |
} | |
.styled-table tbody tr:last-of-type { | |
border-bottom: 2px solid #009879; | |
} | |
.styled-table tbody tr.active-row { | |
font-weight: bold; | |
color: #009879; | |
} |
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 class="styled-table"> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th>Points</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td>Dom</td> | |
<td>6000</td> | |
</tr> | |
<tr class="active-row"> | |
<td>Melissa</td> | |
<td>5150</td> | |
</tr> | |
<!-- and so on... --> | |
</tbody> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Via https://dev.to/dcodeyt/creating-beautiful-html-tables-with-css-428l