# Help with Responsive Menu

**URL:** <https://forum.freecodecamp.org/t/help-with-responsive-menu/257450>\
**Category:** Curriculum Help\
**Tags:** css, html\
**Created:** [February 8, 2019, 12:28am UTC](https://forum.freecodecamp.org/t/help-with-responsive-menu/257450 "2019-02-08T00:28:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![geezr714](https://avatars.discourse-cdn.com/v4/letter/g/c6cbf5/32.png) [@geezr714](https://forum.freecodecamp.org/u/geezr714)\
**Post date:** [February 8, 2019, 12:28am UTC](https://forum.freecodecamp.org/t/help-with-responsive-menu/257450/1 "2019-02-08T00:28:27Z")

</div>

Hey y’all,

Noobie here (obviously!), I’m in need of some help. Looking to make my current navbar easier to use for mobile devices.

I followed a tutorial off of YouTube to create a responsive navbar, but noticed that it doesn’t close itself when I click on one of the buttons. To close the menu, you’d have to click on “Menu” again, which isn’t what we want.

So to counter this, I’d rather have “Menu” be a hovering button that drops down to a menu instead. I’ve tried writing a bare menu to get the results I want, but I don’t know how to do it without creating a separate menu and nav. IE- I’ll make a button that has a drop down menu when I hover over it, I’ll hide it when it’s bigger than 640px, but not sure how to make it show as a regular navbar on a desktop browser.

In short, I just want to see what’s the efficient way to make the navbar I have now, turn into a hovering drop-down menu when it’s in mobile.

Sorry if that doesn’t make sense, I feel like I’m all over the place. But I’m really excited on the way of how my page looks, just the menu has made me run into a wall. Any help would be appreciated. Thanks!

My CodePen for the page here - https ://codepen .io/lastyk/full/ xMpppw

---

<div class="post-metadata">

**Author:** ![alkapwn3d](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/alkapwn3d/32/92787_2.png) [@alkapwn3d](https://forum.freecodecamp.org/u/alkapwn3d)\
**Post date:** [February 8, 2019, 12:42am UTC](https://forum.freecodecamp.org/t/help-with-responsive-menu/257450/2 "2019-02-08T00:42:01Z")

</div>

just post the whole link

> **[xMpppw](https://codepen.io/lastyk/full/xMpppw)**
>
> ...

---

<div class="post-metadata">

**Author:** ![geezr714](https://avatars.discourse-cdn.com/v4/letter/g/c6cbf5/32.png) [@geezr714](https://forum.freecodecamp.org/u/geezr714)\
**Post date:** [February 8, 2019, 12:53am UTC](https://forum.freecodecamp.org/t/help-with-responsive-menu/257450/3 "2019-02-08T00:53:58Z")

</div>

I did, but it told me I can’t post the whole link for security reasons. :T

---

<div class="post-metadata">

**Author:** ![ChrisCline1138](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/chriscline1138/32/111745_2.png) [@ChrisCline1138](https://forum.freecodecamp.org/u/ChrisCline1138)\
**Post date:** [February 8, 2019, 12:56am UTC](https://forum.freecodecamp.org/t/help-with-responsive-menu/257450/4 "2019-02-08T00:56:21Z")

</div>

read this article it might help

> **[Responsive mobile dropdown navigation using css only](https://medium.com/creative-technology-concepts-code/responsive-mobile-dropdown-navigation-using-css-only-7218e4498a99)**
>
> When building a fully responsive site the layout should adapt to different screen sizes, from mobile to tablet and desktop. Navigations are usually complicated as the space is limited, and…

---

<div class="post-metadata">

**Author:** ![geezr714](https://avatars.discourse-cdn.com/v4/letter/g/c6cbf5/32.png) [@geezr714](https://forum.freecodecamp.org/u/geezr714)\
**Post date:** [February 8, 2019, 1:24am UTC](https://forum.freecodecamp.org/t/help-with-responsive-menu/257450/5 "2019-02-08T01:24:00Z")

</div>

Sweet, I’ll give it a shot tonight. Thanks!

---

<div class="post-metadata">

**Author:** ![lasjorg](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lasjorg/32/280761_2.png) [@lasjorg](https://forum.freecodecamp.org/u/lasjorg)\
**Post date:** [February 8, 2019, 5:00am UTC](https://forum.freecodecamp.org/t/help-with-responsive-menu/257450/6 "2019-02-08T05:00:06Z")

</div>

For the hover, you can just add this.

```auto
.wrapper:hover > .navigation {
  display: block;
}

```

As long as the page scroll far enough down when you click a link it will close the menu.

---

<div class="post-metadata">

**Author:** ![geezr714](https://avatars.discourse-cdn.com/v4/letter/g/c6cbf5/32.png) [@geezr714](https://forum.freecodecamp.org/u/geezr714)\
**Post date:** [February 8, 2019, 5:14am UTC](https://forum.freecodecamp.org/t/help-with-responsive-menu/257450/7 "2019-02-08T05:14:36Z")

</div>

@lasjorg that was exactly what it needed, THANK YOU.

I’m going to re-write it all again, in hopes of cleaning it up and making a simpler nav now, all while using the code you gave. Thanks again.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [March 9, 2021, 11:17am UTC](https://forum.freecodecamp.org/t/help-with-responsive-menu/257450/8 "2021-03-09T11:17:51Z")

</div>

Closed on March 9, 2021, 11:17am UTC


