-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpractice-2.html
More file actions
66 lines (59 loc) · 1.71 KB
/
practice-2.html
File metadata and controls
66 lines (59 loc) · 1.71 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">
<title>Exercise 2: Flexbox Layout</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
padding: 20px;
background-color: #f5f5f5;
}
.card {
background: white;
padding: 20px;
margin: 10px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* TODO: Add Flexbox styles below */
</style>
</head>
<body>
<h1>Flexbox Layout Exercise</h1>
<section class="navbar">
<div class="logo">MyLogo</div>
<div class="nav-item">Home</div>
<div class="nav-item">About</div>
<div class="nav-item">Contact</div>
</section>
<h2>Card Layout</h2>
<section class="card-container">
<div class="card">
<h3>Card 1</h3>
<p>This card should be in a row with the others.</p>
</div>
<div class="card">
<h3>Card 2</h3>
<p>Use Flexbox to create equal-width cards.</p>
</div>
<div class="card">
<h3>Card 3</h3>
<p>They should have space between them.</p>
</div>
</section>
<h2>Centered Content</h2>
<section class="center-box">
<div class="centered-content">
<h3>I should be centered!</h3>
<p>Both horizontally and vertically.</p>
</div>
</section>
</body>
</html>