Skip to content

Commit ac3248a

Browse files
committed
tables
1 parent fa7a3d4 commit ac3248a

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
6+
name="viewport">
7+
<meta content="ie=edge" http-equiv="X-UA-Compatible">
8+
<title>Table Component</title>
9+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" rel="stylesheet">
10+
<style>
11+
*,
12+
*::before,
13+
*::after {
14+
margin: 0;
15+
padding: 0;
16+
box-sizing: border-box;
17+
}
18+
19+
body {
20+
font-family: 'Inter', sans-serif;
21+
color: #343a40;
22+
line-height: 1;
23+
display: flex;
24+
justify-content: center;
25+
}
26+
27+
table {
28+
width: 800px;
29+
margin-top: 100px;
30+
font-size: 18px;
31+
/*border: 1px solid #343a40;*/
32+
border-collapse: collapse;
33+
}
34+
35+
th,
36+
td {
37+
/*border: 1px solid #343a40;*/
38+
padding: 16px 24px;
39+
text-align: left;
40+
}
41+
42+
thead th {
43+
background-color: #087f5b;
44+
color: #fff;
45+
width: 25%;
46+
}
47+
48+
tbody tr:nth-child(odd) {
49+
background-color: #f8f9fa;
50+
}
51+
52+
tbody tr:nth-child(even) {
53+
background-color: #e9ecef;
54+
}
55+
56+
tbody tr:hover {
57+
background-color: #e9ecef;
58+
}
59+
</style>
60+
</head>
61+
<body>
62+
<table>
63+
<thead>
64+
<tr>
65+
<th>Chair</th>
66+
<th>The Laid Back</th>
67+
<th>The Worker Bee</th>
68+
<th>The Chair 4/2</th>
69+
</tr>
70+
</thead>
71+
<tbody>
72+
<tr>
73+
<th>Width</th>
74+
<td>80 cm</td>
75+
<td>60 cm</td>
76+
<td>220 cm</td>
77+
</tr>
78+
<tr>
79+
<th>Height</th>
80+
<td>100 cm</td>
81+
<td>110 cm</td>
82+
<td>90 cm</td>
83+
</tr>
84+
<tr>
85+
<th>Depth</th>
86+
<td>70 cm</td>
87+
<td>65 cm</td>
88+
<td>80 cm</td>
89+
</tr>
90+
<tr>
91+
<th>Weight</th>
92+
<td>16 kg</td>
93+
<td>22 kg</td>
94+
<td>80 kg</td>
95+
</tr>
96+
</tbody>
97+
</table>
98+
</body>
99+
</html>

0 commit comments

Comments
 (0)