-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcss_flexbox_lecture.html
More file actions
40 lines (38 loc) · 950 Bytes
/
css_flexbox_lecture.html
File metadata and controls
40 lines (38 loc) · 950 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Flexbox Basics Examples</title>
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: Helvetica;
font-weight: bold;
}
.flex-container {
width: 100%;
border: 3px solid goldenrod;
display: flex;
/* additional container (flex parent) properties */
flex-direction: row;
justify-content: center;
}
.flex-item {
background: #BFD45D;
border: 2px solid #F9EFD6;
padding: 1em;
/* additional item (flex children) properties */
}
</style>
</head>
<body>
<div class="flex-container">
<div class="flex-item">Item 1</div>
<div class="flex-item">Item 2</div>
<div class="flex-item">Item 3</div>
</div>
</body>
</html>