# Hide menu in the header on specific page

**URL:** <https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352>\
**Category:** CMS Development\
**Tags:** site-setup, css\
**Created:** [July 24, 2020, 8:37am UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352 "2020-07-24T08:37:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jelmert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jelmert/32/82797_2.png) [@Jelmert](https://community.hubspot.com/u/Jelmert)\
**Post date:** [July 24, 2020, 8:37am UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/1 "2020-07-24T08:37:11Z")

</div>

Hello,

I would like the hide the menu in the header on pages like a landing page. Is there a code I can add to the additional html in the settings? I can change it in the global editor, but then I have no menu on all my pages  
Page: [http://www-hrorganizer-com.sandbox.hs-sites.com/nl-nl/assessments?hs\_preview=sggFrzwe-32737829920](http://www-hrorganizer-com.sandbox.hs-sites.com/nl-nl/assessments?hs_preview=sggFrzwe-32737829920)

---

<div class="post-metadata">

**Author:** ![Chris-M](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chris-m/32/61599_2.png) [@Chris-M](https://community.hubspot.com/u/Chris-M)\
**Post date:** [July 24, 2020, 8:49am UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/2 "2020-07-24T08:49:54Z")

</div>

Hello @Jelmert,

Basicly you have 2 ways, to archive this.

Best way is to copy the template and remove the navigation and use the copy template for landing pages.

The other way is, remove it via css on the page settings → advanced options → Additional code snippets, with the following CSS code

```auto
<style>
 .header __menu.header__ element, .header__search--wrapper {
 display: none;
 }
</style>

```

![29601i6013B41562682786.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/a/caff71f03f9a6f0f70ff4bd7fe86045b2055dc4d.png)

This should remove the navigation and the search button on this page.

- Chris

---

<div class="post-metadata">

**Author:** ![Jelmert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jelmert/32/82797_2.png) [@Jelmert](https://community.hubspot.com/u/Jelmert)\
**Post date:** [July 24, 2020, 9:14am UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/3 "2020-07-24T09:14:28Z")

</div>

Thanks @Chris-M !

This did hide the menu, but for some reason it did not hide the search button/icon. (using the code)

I’ll give the other option a try if there is no solution for this. Thanks for the quick response and help 🙂

---

<div class="post-metadata">

**Author:** ![Chris-M](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chris-m/32/61599_2.png) [@Chris-M](https://community.hubspot.com/u/Chris-M)\
**Post date:** [July 24, 2020, 9:26am UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/4 "2020-07-24T09:26:18Z")

</div>

Hello @Jelmert,

i messed up a bit… i missed the “.” for the class, this should now work

```auto
<style>
 .header __menu.header__ element, .header__search--wrapper {
 display: none;
 }
</style>

```

- Chris

---

<div class="post-metadata">

**Author:** ![Jelmert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jelmert/32/82797_2.png) [@Jelmert](https://community.hubspot.com/u/Jelmert)\
**Post date:** [July 24, 2020, 9:49am UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/5 "2020-07-24T09:49:25Z")

</div>

Thank you @Chris-M , works like a charm.

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![Jelmert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jelmert/32/82797_2.png) [@Jelmert](https://community.hubspot.com/u/Jelmert)\
**Post date:** [August 11, 2020, 3:03pm UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/6 "2020-08-11T15:03:23Z")

</div>

Het @Chris-M The code works, but we see in hotjar that people can still see a 'hamburger 'menu when they view it on mobile. It is just not clickable, any way to fix this?

---

<div class="post-metadata">

**Author:** ![Chris-M](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chris-m/32/61599_2.png) [@Chris-M](https://community.hubspot.com/u/Chris-M)\
**Post date:** [August 11, 2020, 3:53pm UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/7 "2020-08-11T15:53:33Z")

</div>

Hey @Jelmert,

just replace the old code with:

`.header __menu.header__ element, .header __search--wrapper, body .header__ navigation--toggle { display: none;}`

The “body .header\_\_navigation--toggle” is for the mobile Nav.

- Chris

---

<div class="post-metadata">

**Author:** ![Jelmert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jelmert/32/82797_2.png) [@Jelmert](https://community.hubspot.com/u/Jelmert)\
**Post date:** [August 12, 2020, 7:23am UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/8 "2020-08-12T07:23:52Z")

</div>

Thanks again! Seems to work  
 ![16x16_smiley-very-happy.png.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/a/a83ec960612094a57cfb392e21c202c8e77b967c.png)

---

<div class="post-metadata">

**Author:** ![Jelmert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jelmert/32/82797_2.png) [@Jelmert](https://community.hubspot.com/u/Jelmert)\
**Post date:** [September 9, 2020, 11:05am UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/9 "2020-09-09T11:05:38Z")

</div>

Hey @Chris-M

Do you know a code to hide the footer as well?

For example for this page: [https://www.hrorganizer.com/nl/selectie-selectie](https://www.hrorganizer.com/nl/selectie-selectie)

Thanks in advance.

Jelmer

---

<div class="post-metadata">

**Author:** ![Jelmert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jelmert/32/82797_2.png) [@Jelmert](https://community.hubspot.com/u/Jelmert)\
**Post date:** [September 9, 2020, 11:31am UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/10 "2020-09-09T11:31:06Z")

</div>

Ah, worked it out with this

\<style\>  
.footer\_\_columns {  
display: none;  
}  
\</style\>

@Chris-M

---

<div class="post-metadata">

**Author:** ![Jelmert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jelmert/32/82797_2.png) [@Jelmert](https://community.hubspot.com/u/Jelmert)\
**Post date:** [September 10, 2020, 8:42am UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/11 "2020-09-10T08:42:10Z")

</div>

Hi @Chris-M

Sorry to bother you again, but had another question.

I updated the header, but now i cant seem to get the navigation to hide in the header.

This is the code im using, it hides everything but not the search icon for some reason.

\<style\>.header\_\_menu.header\_\_element,.header\_\_cta--desktop,.header\_\_search--wrapper,body .header\_\_navigation--toggle {  
display: none;  
}  
\</style\>

I’m working on this page:

[https://www.hrorganizer.com/nl/bias-free-e-assessment?hs\_preview=VlNlPoeQ-33713765252](https://www.hrorganizer.com/nl/bias-free-e-assessment?hs_preview=VlNlPoeQ-33713765252)

Hope you can help

---

<div class="post-metadata">

**Author:** ![Jelmert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jelmert/32/82797_2.png) [@Jelmert](https://community.hubspot.com/u/Jelmert)\
**Post date:** [September 10, 2020, 12:16pm UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/12 "2020-09-10T12:16:43Z")

</div>

Got it to work with this 😄

\<style\>..header\_\_menu.header\_\_element,.header\_\_cta--desktop,.header\_\_search--wrapper,body .header\_\_navigation--toggle {  
display: none!important;  
}

\</style\>

---

<div class="post-metadata">

**Author:** ![Chris-M](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chris-m/32/61599_2.png) [@Chris-M](https://community.hubspot.com/u/Chris-M)\
**Post date:** [September 10, 2020, 12:23pm UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/13 "2020-09-10T12:23:03Z")

</div>

Hello @Jelmert,

sorry for the late response, i was about to answere your question, but you just figured all out by yourself, **which is great!**

I think there might be a typo in you style call, you have 2 “..header\_\_menu.header\_\_element” on the start of your class, should be just one “.header\_\_menu.header\_\_element”

- Chris

---

<div class="post-metadata">

**Author:** ![Jelmert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jelmert/32/82797_2.png) [@Jelmert](https://community.hubspot.com/u/Jelmert)\
**Post date:** [September 10, 2020, 12:29pm UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/14 "2020-09-10T12:29:59Z")

</div>

Ah indeed a typo. Thanks for the response anyway, maybe you could help me with something else.  
Im trying to get a smaller font in the legal text in my footer. I cant edit it in the theme and i cant change anything in the code. So i tried adding:

"\<style\>.legal-consent-container {font-size:12px;}!important;

\</style\>"

I tried adding the important to see if that would help, but no luck. For example im using this page: [Edit Page | HubSpot](https://app.hubspot.com/content/294088/edit/32583948686/content)

 ![31459iB90271E7A23C0134.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/0/80e5ae5a080d664ad6aae4dcbc539f354c171c49.png)

The text is in a form, which normally i can edit. But it being in the footer i cant edit it.

---

<div class="post-metadata">

**Author:** ![Chris-M](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chris-m/32/61599_2.png) [@Chris-M](https://community.hubspot.com/u/Chris-M)\
**Post date:** [September 10, 2020, 12:37pm UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/15 "2020-09-10T12:37:55Z")

</div>

Hey @Jelmert,

You need to go a bit deeper into the css classes of this container,

Could you try the following:

```lia-code-sample
.legal-consent-container p {
 font-size: 12px;
}

```

If you ever want to put an !important tag to an style command, you have to put it in the brackets to the command, for example:

```lia-code-sample
.legal-consent-container p {
 font-size: 12px !important;
}​

```

Just as an example:

 ![31462iA0E6B2FC7FE8ACFF.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/9/898e08d29ac0c1980318b230871e2819fc5ed51d.png)

You’ve tried to give the font-size command the yellow marked container, but the paragraph element is the one, which is displaying the text, so if you want to reduce the text size the p element needs the command.

- Chris

---

<div class="post-metadata">

**Author:** ![Jelmert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jelmert/32/82797_2.png) [@Jelmert](https://community.hubspot.com/u/Jelmert)\
**Post date:** [September 10, 2020, 12:54pm UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/16 "2020-09-10T12:54:17Z")

</div>

Thank you again!

```auto
.legal-consent-container p {
 font-size: 12px;
}

```

This worked for me. The only way to do this global, is to change the code in the template/theme right?

Thanks again, I’m learning as I go.

---

<div class="post-metadata">

**Author:** ![Chris-M](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chris-m/32/61599_2.png) [@Chris-M](https://community.hubspot.com/u/Chris-M)\
**Post date:** [September 10, 2020, 2:18pm UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/17 "2020-09-10T14:18:29Z")

</div>

@Jelmert

There are a couple of ways.

It really depends on how you are using CSS.

The best way for me would be to start/use a CSS file inside the Design Manager and link this stylesheet to your Template under “linked stylesheet”

 ![31472iC7E3949C72A93DA6.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/d/ad2eeac03d23393aeb8e7d68f8359d18e10276ef.png)

The template will basicly receive all the styling you have done inside the styles.css file, if you update the file it will be automaticly updated on the template/pages.

- Chris

---

<div class="post-metadata">

**Author:** ![phipps](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/phipps/32/28756_2.png) [@phipps](https://community.hubspot.com/u/phipps)\
**Post date:** [November 28, 2020, 7:56pm UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/18 "2020-11-28T19:56:54Z")

</div>

Is this still working for you today? I’m not able to get this to remove on the mobile nav.

---

<div class="post-metadata">

**Author:** ![Jelmert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jelmert/32/82797_2.png) [@Jelmert](https://community.hubspot.com/u/Jelmert)\
**Post date:** [December 3, 2020, 2:08pm UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/19 "2020-12-03T14:08:29Z")

</div>

It is still working for me yes.

\<style\>.header\_\_menu.header\_\_element,.header\_\_cta--desktop,.header\_\_search--wrapper,body .header\_\_navigation--toggle {  
display: none!important;  
}

\</style\>

---

<div class="post-metadata">

**Author:** ![KSchultz](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kschultz/32/69256_2.png) [@KSchultz](https://community.hubspot.com/u/KSchultz)\
**Post date:** [March 22, 2021, 3:26pm UTC](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352/20 "2021-03-22T15:26:12Z")

</div>

Hi Chris!

I want to achieve something similar by wanting to hide the header entirely, especially the logo.  
Is there code that can achieve thise?

Thanks in advance.

[Next page](https://community.hubspot.com/t/hide-menu-in-the-header-on-specific-page/23352.md?page=2)
