-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcss_flexbox_1.html
More file actions
66 lines (64 loc) · 2.12 KB
/
css_flexbox_1.html
File metadata and controls
66 lines (64 loc) · 2.12 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible", content="IE-edge">
<title>CSS Flexbox | Vijay CSS</title>
<link rel="stylesheet", href="css/style.css">
<link rel="stylesheet", href="css/fonts.css">
<link rel="stylesheet", href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"> <!--Import more fonts from font-awesome-->
<style>
body
{
font-family: Arial;
min-height: 100vh;
padding: 20px;
background-color: #9c9c9c;
}
.container
{
max-width: 800px;
min-height: 400px;
margin-inline: auto;
border: 1px solid black;
display: flex;
gap: 1rem;
justify-content: space-evenly;
align-items: center;
flex-flow: row-reverse;
align-content: space-evenly;
}
.box
{
/* min-width: 100px; */
height: 100px;
background-color: grey;
color: white;
font-size: 2rem;
padding: 0.5rem;
display: flex;
justify-content: center; /* horizontally align text to centre */
align-items: center; /* vertically align text to center */
flex: 1 1 150px;
/* flex-basis: 150px;
flex-shrink: 1; */
}
.box:nth-child(2) {flex: 2 2 150px; order: 1;}
</style>
</head>
<body>
<header>
</header>
<main class="container">
<div class="box">1</div>
<div class="box">2</div>
<div class="box">3</div>
<div class="box">4</div>
<div class="box">5</div>
<div class="box">6</div>
</main>
<footer>
</footer>
</body>
</html>