-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path10-flex-inline.html
More file actions
82 lines (71 loc) · 2.21 KB
/
10-flex-inline.html
File metadata and controls
82 lines (71 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Laracasts: CSS Flexbox Simplified</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css"
integrity="sha512-xh6O/CkQoPOWDdYTDqeRdPCVd1SpvCA9XXcUnZS2FmJNp1coAFzvtCN9BmamE+4aHK8yyUHUSCcJHgXloTyT2A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="css/base.css" />
<style>
section {
padding: 2rem;
max-width: 48rem;
/* display: flex;
flex-wrap: wrap;
margin: auto; */
}
label {
display: inline-flex;
align-items: center;
gap: 1rem;
}
input[type="checkbox"] {
display: none;
}
input[type="checkbox"]:checked ~ span i {
color: #0d9488;
}
section > p {
margin-bottom: 1rem;
}
</style>
</head>
<body>
<section class="tags">
<p>The previous solution of adding Display Flex to the section element works perfectly.</p>
<p>So, Display Inline Flex can be used instead of Display Flex when you want this container to act as an inline element instead of block level element.</p>
<label for="laravel">
<input type="checkbox" name="laravel" id="laravel" checked />
<p>Laravel</p>
<span><i class="fa-solid fa-circle-check"></i></span>
</label>
<label for="tailwindcss">
<input type="checkbox" name="tailwindcss" id="tailwindcss" />
<p>Tailwind CSS</p>
<span><i class="fa-solid fa-circle-check"></i></span>
</label>
<label for="webdevelopment">
<input type="checkbox" name="webdevelopment" id="webdevelopment" checked />
<p>Web Development</p>
<span><i class="fa-solid fa-circle-check"></i></span>
</label>
<label for="vuejs">
<input type="checkbox" name="vuejs" id="vuejs" />
<p>Vue JS</p>
<span><i class="fa-solid fa-circle-check"></i></span>
</label>
<label for="serverless">
<input type="checkbox" name="serverless" id="serverless" />
<p>Serverless</p>
<span><i class="fa-solid fa-circle-check"></i></span>
</label>
<label for="aws">
<input type="checkbox" name="aws" id="aws" />
<p>AWS</p>
<span><i class="fa-solid fa-circle-check"></i></span>
</label>
</section>
</body>
</html>