I've been working on my website and I'm having an issue with the header overlapping. I used float left for my navigation bar, but when I try to add a showcase below it, the showcase only overlaps the header section. The aim is to have a navigation bar at the top left with a dropdown menu, followed by a showcase that covers the rest of the screen. Any suggestions on how to fix this will be greatly appreciated :).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>my website</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header>
<div class="container">
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li class="dropdown-link"><a href="#">list 1</a>
<ul>
<li class="dropdown-content"><a href="#">sublist 1</a></li>
<li class="dropdown-content"><a href="#">sublist 2</a></li>
</ul>
</li>
<li class="dropdown-link"><a href="#">list 2</a>
<ul>
<li class="dropdown-content"><a href="#">sublist 1</a></li>
<li class="dropdown-content"><a href="#">sublist 2</a></li>
</ul>
</li>
</ul>
</nav>
</div>
</header>
<section>
<h1> Hello World</h1>
</section>
</body>
</html>
body {
padding: 0;
margin: 0;
}
.container {
width: 100%;
float: none;
}
ul {
padding: 0;
margin: 0;
list-style: none;
}
ul li a {
color: black;
text-decoration: none;
}
header {
width: 90%;
margin: auto;
display: block;
}
header ul li {
float: left;
padding: 10px;
}
.dropdown-content {
float: none;
padding: 5px 0 5px 0;
display: none;
}
.dropdown-link:hover .dropdown-content {
display: block;
}
.showcase {
display: block;
}