I was trying to make a website but ran into issues with the dropdown menu.
I watched a video on youtube about how to make one, but I made some changes myself and there is something wrong with it. As you can see on the screenshot below it drags the rest of the navigation bar down with it (Home and Contact us), which is not what I intend it to do.
I have tried various things, but this is the closest I have come.
HTML
<div class="navigation">
<ul>
<li><a>☰</a>
<ul>
<li><a href="#">example1</a></li>
<li><a href="#">example2</a></li>
</ul>
</li>
<li><a href="index.html">Home</a></li>
<li><a href="contactpage.html">Contact us</a></li>
</ul>
</div>
CSS
.navigation ul{
width: 100%;
height: 25px;
margin: 0;
padding: 10px 120px;
background: rgba(53, 57, 53,0.9);
.navigation ul{
width: 100%;
height: 25px;
margin: 0;
padding: 10px 120px;
background: rgba(53, 57, 53,0.9);
.navigation ul li{
display: inline;
padding: 0px 10px 0px 0px;
list-style-type: none;
.navigation ul li a {
/*display: block;*/
padding: 10px 0px;
text-decoration: none;
color: #E5E4E2;
.navigation ul li ul {
display: none;
width: 130px;
background: rgba(53, 57, 53,0.9);
.navigation ul li:hover ul{
display: block;
.navigation ul li ul li {
float: left;
.navigation ul li ul li a{
padding: ;
.navigation ul li ul li a:hover {
color: #AFE1AF;
.navigation ul li a:hover{
color: #AFE1AF;
