I can't seem to create some space between my top navigation menu and the dropdown list (when hovered). Check out this screenshot for reference: the lack of space is making it look cluttered
I attempted to add a margin-top: 10px; to the css of the dropdown, but it ended up disabling the hover effect.
Below is my code snippet:
.header {
position: relative;
top: 0; left: 0; right: 0;
width: 100%;
height: 140px;
line-height: 140px;
background-color: #060930;
}
.header .btn {
display: inline-block;
vertical-align: middle;
line-height: normal;
margin-left: 2%;
}
.ad, .arch, .abt {
font-family: 'product_sansbold';
font-weight: normal;
font-style: normal;
background-color: transparent;
border: transparent;
cursor: pointer;
margin: 0 4px;
}
.ad {
color: #FBF3FF;
font-size: 32px;
}
.arch, .abt {
color: #a1a6e6;
font-size: 18px;
}
.arch:hover, .abt:hover {
transition-duration: 0.3s;
color: #d7daff;
}
.arch:active, .abt:active {
color: #d7daff;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-cont {
display: none;
position: absolute;
background-color: #a1a6e6;
min-width: 160px;
border-radius: 6px;
z-index: 1;
}
.dropdown-cont a {
font-family: 'product_sansbold';
color: #060930;
padding: 14px 16px;
text-decoration: none;
display: block;
}
.dropdown:hover .dropdown-cont {
display: block;
background-color: #a1a6e6;
}
.dropdown-cont a:hover {
text-decoration: underline;
}
<!DOCTYPE html>
<div class="header">
<div class="btn">
<button class="ad" type="button" onclick="window.location.href='index.html'"><b>AD.</b></button>
<div class="dropdown">
<button class="arch" type="button" onclick="window.location.href='archive.html'"><b>Archive</b></button>
<div class="dropdown-cont">
<a href="stories.html">Stories</a>
<a href="photos.html">Photos</a>
</div>
</div>
<button class="abt" type="button" onclick="window.location.href='about.html'"><b>About</b></button>
</div>
</div>
</html>