Skip to content

Commit 2f846ef

Browse files
committed
ch. 92: Building a Table Component - Part 2
1 parent 772834f commit 2f846ef

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

starter/06-Components/03-table.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,40 @@
3535
font-family: "Inter", sans-serif;
3636
color: #343a40;
3737
line-height: 1;
38+
display: flex;
39+
justify-content: center;
40+
}
41+
42+
table {
43+
width: 800px;
44+
margin-top: 100px;
45+
/* border: 1px solid #343a40; */
46+
border-collapse: collapse;
47+
font-size: 18px;
48+
}
49+
50+
th,
51+
td {
52+
/* border: 1px solid #343a40; */
53+
padding: 16px 24px;
54+
text-align: left;
55+
}
56+
57+
thead tr {
58+
background-color: #087f5b;
59+
color: #fff;
60+
}
61+
62+
thead th {
63+
width: 25%;
64+
}
65+
66+
tbody tr:nth-child(odd) {
67+
background-color: #f8f9fa;
68+
}
69+
70+
tbody tr:nth-child(even) {
71+
background-color: #e9ecef;
3872
}
3973
</style>
4074
</head>

0 commit comments

Comments
 (0)