-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflexbox.html
More file actions
53 lines (42 loc) · 1.06 KB
/
flexbox.html
File metadata and controls
53 lines (42 loc) · 1.06 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>flex box</title>
<style>
div{
padding:5px;
border:2px solid black;
}
.parent{
background-color:aquamarine;
height: 300px;
display:flex;
justify-content:start;
align-items:center;
flex-wrap:wrap;
}
.child{
background-color:whitesmoke;
width:100px;
height: 30px;
}
#cl-2{
background-color: blue;
flex:20;
}
#cl-3{
flex:10;
}
</style>
</head>
<body>
<div class="parent">
<div class="child">ITEM 1</div>
<div id="cl-2" class="child">ITEM 2</div>
<div id="cl-3" class="child" >ITEM 3</div>
<div class="child">ITEM 4 </div>
</div>
</body>
</html>