I am facing an issue with creating a navigation bar that covers up the header text. I tried adjusting the margins to fix this problem but ended up moving the header along with the navigation bar. How can I ensure that the navigation bar remains fixed without covering the header?
body {
margin: 0;
padding: 0;
background: #2E4053;
color: white;
font-family: 'Raleway', sans-serif;
}
.welcome {
height: 100px;
margin: px; /* ? */
}
.welcome h1 {
text-align: center;
font-family: 'Berkshire Swash', cursive;
color: white;
padding: 26px;
margin: 0 25%;
border-bottom: 2px solid white;
}
.nav {
height: 60px;
width: 100%;
background-color: lawngreen;
position: fixed;
}
.search {
float: right;
margin-top: -52px;
margin-right: 35px;
}
input {
height: 20px;
border-radius: 7px;
}
.nav ul {
list-style: none;
text-decoration: none;
}
.nav ul li a {
text-decoration: none;
}
.nav ul li {
display: inline-block;
padding: 0px 20px;
font-size: 25px;
color: black;
margin: 3px 50px;
font-family: 'Boogaloo', cursive;
}
.nav ul li a:hover {
text-decoration: line-through;
color: blue;
transition: 0.5s;
}
.search a i:hover {
color: white;
font-size: 33px;
}
<link href="https://fonts.googleapis.com/css?
family=Berkshire+Swash|Boogaloo|Lobster+Two|Raleway|Amaranth" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-
awesome.min.css" rel="stylesheet">
<div class="nav">
<ul>
<li><a href="#me">About Me</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#gallery">Gallery</a></li>
<li><a href="#find">Find Us</a></li>
</ul>
<div class="search">
<input type="text" placeholder="Search">
<a href="https://google.com"><i class="fa fa-search" style="font-
size:30px;"></i></a>
</div>
</div>
<div class="welcome">
<h1>Welcome to My Travel Blog</h1>
</div>