-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #146 from Arpita-45/main
Navbar with home, about, sector, contact us
- Loading branch information
Showing
2 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
text-decoration: none; | ||
list-style: none; | ||
} | ||
|
||
body { | ||
background: url(charity1.jpg)no-repeat center; | ||
background-size: cover; | ||
background-attachment: fixed; | ||
} | ||
|
||
|
||
nav { | ||
position: fixed; | ||
height: 70px; | ||
width: 100%; | ||
color: rgb(254, 252, 249); | ||
background: rgba(22, 246, 246, 0.358); | ||
box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1); | ||
padding: 0; | ||
display: inline-block; | ||
} | ||
|
||
|
||
nav ul { | ||
float: right; | ||
margin-right: 25px; | ||
} | ||
|
||
nav ul li { | ||
display: inline-block; | ||
line-height: 80px; | ||
margin: 0 15px; | ||
|
||
} | ||
|
||
nav ul li a { | ||
position: relative; | ||
font-family: 'PT Sans', sans-serif; | ||
font-size: 20px; | ||
|
||
color: rgb(255, 255, 255); | ||
|
||
} | ||
|
||
a.active, | ||
a:hover { | ||
color: aqua; | ||
} | ||
|
||
label #btn, | ||
label #cancel { | ||
font-size: 30px; | ||
color: white; | ||
line-height: 80px; | ||
float: right; | ||
margin-right: 40px; | ||
cursor: pointer; | ||
display: none; | ||
} | ||
|
||
#check { | ||
display: none; | ||
|
||
} | ||
|
||
.child { | ||
margin: 30px; | ||
display: flex; | ||
} | ||
|
||
@media (max-width:1118px) { | ||
nav img { | ||
left: 8%; | ||
} | ||
} | ||
|
||
@media(max-width:944px) { | ||
nav img { | ||
left: 6%; | ||
top: 20px; | ||
width: 190px; | ||
} | ||
|
||
nav ul li a { | ||
font-size: 17px; | ||
} | ||
} | ||
|
||
@media(max-width:860px) { | ||
label #btn { | ||
display: block; | ||
} | ||
|
||
ul { | ||
position: fixed; | ||
width: 100%; | ||
height: 100vh; | ||
background: rgba(22, 246, 246, 0.358); | ||
top: 80px; | ||
text-align: center; | ||
left: -100%; | ||
transition: all .5s; | ||
} | ||
|
||
nav ul li { | ||
display: block; | ||
margin: 50px 0; | ||
line-height: 30px; | ||
} | ||
|
||
nav ul li a { | ||
font-size: 20px; | ||
} | ||
|
||
#check:checked~ul { | ||
left: 0; | ||
} | ||
|
||
#check:checked~label #btn { | ||
display: none; | ||
} | ||
|
||
#check:checked~label #cancel { | ||
display: block; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>landing page</title> | ||
<style> | ||
@import url('https://fonts.googleapis.com/css2?family=PT+Sans&family=Poppins:wght@500&display=swap'); | ||
</style> | ||
<link rel="stylesheet" href="style.css"> | ||
<script src="https://kit.fontawesome.com/a076d05399.js"></script> | ||
</head> | ||
|
||
<body> | ||
<header> | ||
<nav> | ||
<input type="checkbox" id="check"> | ||
<label for="check"> | ||
<i class="fas fa-bars" id="btn"></i> | ||
<i class="fas fa-times" id="cancel"></i> | ||
</label> | ||
|
||
<ul> | ||
<li><a class="active" href="#"><strong>HOME</strong></a></li> | ||
<li><a href="#"><strong>ABOUT </strong></a></li> | ||
<li><a href="#"><strong>SECTORS</strong></a></li> | ||
<li><a href="# "><strong>CONTACT US</strong></a></li> | ||
</ul> | ||
</nav> | ||
</header> | ||
|
||
|
||
|
||
|
||
</body> | ||
|
||
</html> |