Is it possible to apply the margins of child li elements to the parent li elements as well? Currently, the submenu under "Projekte" is overlapping with "Kontakt" below. Any assistance would be greatly appreciated!
#hide {
display: none;
}
#projekte:hover #hide {
display: block;
}
li {
width: 80px;
height: 30px;
border-bottom: 1px solid;
margin-top: 50px;
}
a {
color: grey;
text-decoration: none;
}
ul {
list-style-type: none;
}
a:hover {
color: blue;
}
<h1>Navigationsmenü</h1>
<br />
<br />
<ul>
<li><a href="">Home</a></li>
<li id="projekte">
<a href="projektuebersicht.html">Projekte</a>
<ul id="hide">
<li><a href="projekt1.html">Projekt 1</a></li>
<li><a href="projekt2.html">Projekt 2</a></li>
</ul>
</li>
<li><a href="mailto:">Kontakt</a></li>
</ul>