-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathp1.html
56 lines (50 loc) · 1.14 KB
/
p1.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Debug Challenge - Navigation Bar</title>
<style>
body {
margin: 0;
font-family: "Comic Sans", "Comic Sans MS", cursive;
font-weight: 900;
}
.navbar {
overflow: hidden;
background: linear-gradient(to right, red, blue);
position: fixed;
top: 50%;
width: 80%;
margin: auto;
}
.navbar a {
float: left;
display: block;
color: white;
text-align: center;
padding: 14px 20px;
text-decoration: none;
}
@media screen and (max-width: 768px) {
.navbar a {
float: none;
display: none;
text-align: left;
}
}
</style>
</head>
<body>
<div class="navbar">
<a href="#home">Home</a>
<a href="#news">News</a>
<a href="#contact">Contact</a>
<a href="#about">About</a>
</div>
<div style="padding-left:16px">
<h2>Misplaced Navigation Bar Challenge</h2>
<p>Your task is to debug the navigation bar to position it correctly at the top of the page.</p>
</div>
</body>
</html>