Skip to content

Commit 485a3dc

Browse files
committed
Added responsive menu
1 parent cde0826 commit 485a3dc

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Sample Menu</title>
8+
9+
<style>
10+
11+
nav {
12+
background-color: black;
13+
padding: 10px;
14+
font-family: Arial, Helvetica, sans-serif;
15+
}
16+
17+
nav ul {
18+
list-style: none;
19+
margin: 0;
20+
padding: 0;
21+
}
22+
23+
nav ul li {
24+
padding: 0 10px 0 0;
25+
margin: 0;
26+
display: inline-block;
27+
}
28+
29+
nav a:link,
30+
nav a:visited,
31+
nav a:active,
32+
nav a:hover {
33+
color: #fff;
34+
font-size: 120%;
35+
text-decoration: none;
36+
}
37+
38+
@media (max-width: 768px) {
39+
nav {
40+
padding: 0;
41+
}
42+
nav ul li {
43+
display: block;
44+
padding: 15px;
45+
text-align: center;
46+
border-bottom: 1px solid #fff
47+
}
48+
}
49+
50+
51+
</style>
52+
53+
54+
</head>
55+
<body>
56+
57+
<nav>
58+
59+
<ul>
60+
<li><a href="#">Home</a></li>
61+
<li><a href="#">About</a></li>
62+
<li><a href="#">Projects</a></li>
63+
<li><a href="#">Contact</a></li>
64+
</ul>
65+
66+
</nav>
67+
68+
</body>
69+
</html>

0 commit comments

Comments
 (0)