# Menu icon not fitting into the header

**URL:** <https://forum.freecodecamp.org/t/menu-icon-not-fitting-into-the-header/392549>\
**Category:** Curriculum Help\
**Tags:** css, html\
**Created:** [May 22, 2020, 10:14am UTC](https://forum.freecodecamp.org/t/menu-icon-not-fitting-into-the-header/392549 "2020-05-22T10:14:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ugoamaka](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ugoamaka/32/148779_2.png) [@ugoamaka](https://forum.freecodecamp.org/u/ugoamaka)\
**Post date:** [May 22, 2020, 10:14am UTC](https://forum.freecodecamp.org/t/menu-icon-not-fitting-into-the-header/392549/1 "2020-05-22T10:14:30Z")

</div>

Hello campers  
I can’t figure out why the menu icon (Which should have the dropdown) won’t fit properly…  
Someone please help me.

**Your code so far**  
Here’s the link  
[https://codepen.io/ugoamaka/pen/vYNrKeg](https://codepen.io/ugoamaka/pen/vYNrKeg)

**Your browser information:**

User Agent is: `Mozilla/5.0 (Linux; Android 8.1.0; CPH1909 Build/O11019) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36`.

**Challenge:** Build a Product Landing Page

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/2022/responsive-web-design/build-a-product-landing-page-project/build-a-product-landing-page)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![singhshemona](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/singhshemona/32/147781_2.png) [@singhshemona](https://forum.freecodecamp.org/u/singhshemona)\
**Post date:** [May 22, 2020, 7:26pm UTC](https://forum.freecodecamp.org/t/menu-icon-not-fitting-into-the-header/392549/2 "2020-05-22T19:26:26Z")

</div>

**In the CSS:**

1. Update #header-img to:

```auto
#header-img {
  vertical-align: middle;
  max-width: 30px;
  border-radius: 50%;
}

```

1. Remove the `padding: 14px 16px;` you have on all a tags, you can add the padding later to the rest of the a tags on the page with a more specific class so the menu is not affected
2. Add `display: flex` to `#header`

* * *

**In the HTML:**  
4. Move your pink icon right below the header so it looks like this:

```auto
<header id="header">
   <a href="javascript:void(0);" class="icon" onclick="myFunction()">
   // rest of the header code

```

Making these changes gets your hamburger menu icon, website icon and title all in one line!

---

<div class="post-metadata">

**Author:** ![ugoamaka](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ugoamaka/32/148779_2.png) [@ugoamaka](https://forum.freecodecamp.org/u/ugoamaka)\
**Post date:** [May 23, 2020, 2:35am UTC](https://forum.freecodecamp.org/t/menu-icon-not-fitting-into-the-header/392549/3 "2020-05-23T02:35:05Z")

</div>

That was really helpful…thank you very much @singhshemona, I really appreciate.  
Only that I had to add the link after other header codes because I wanted it on the right…but the links in the menu icon are not droping down when I click on it…  
any ideas how I can achieve that?

---

<div class="post-metadata">

**Author:** ![singhshemona](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/singhshemona/32/147781_2.png) [@singhshemona](https://forum.freecodecamp.org/u/singhshemona)\
**Post date:** [May 23, 2020, 1:28pm UTC](https://forum.freecodecamp.org/t/menu-icon-not-fitting-into-the-header/392549/4 "2020-05-23T13:28:11Z")

</div>

Hmm…the “features / about us / etc” isn’t opening when you click on the black hamburger menu icon? It seems to be working for me 🤔

---

<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:** [May 31, 2021, 3:47pm UTC](https://forum.freecodecamp.org/t/menu-icon-not-fitting-into-the-header/392549/5 "2021-05-31T15:47:38Z")

</div>

Closed on May 31, 2021, 3:47pm UTC


