-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflex direction.html
More file actions
61 lines (46 loc) · 1.32 KB
/
flex direction.html
File metadata and controls
61 lines (46 loc) · 1.32 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
### FLEX DIRECTION WITH HTML AND CSS ###
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flex Direction</title>
<!-- HINT:
https://developer.mozilla.org/en-US/docs/Web/CSS/Universal_selectors
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors/Combinators
-->
<style>
.container {
color: white;
border: 5px solid gold;
display: inline-flex;
flex-direction: column;
}
.container > div{
flex-basis: 100px;
}
/*
Select all the elements that are the direct
children of the .container class.
*/
.red {background-color: #eb4d4b;}
.orange {background-color: #f0932b;}
.yellow {background-color: #f6e58d;}
.green {background-color: #6ab04c;}
.blue {background-color: #4834d4;}
.indigo {background-color: #30336b;}
.purple {background-color: #be2edd;}
</style>
</head>
<body>
<div class="container">
<div class="red">Red</div>
<div class="orange">Orange</div>
<div class="yellow">Yellow</div>
<div class="green">Green</div>
<div class="blue">Blue</div>
<div class="indigo">Indigo</div>
<div class="purple">Purple</div>
</div>
</body>
</html>