Jump to content

Force Hamburger Menu on Desktop on a SINGLE Page only

Recommended Posts

  • Replies 11
  • Views 2k
  • Created
  • Last Reply

Top Posters In This Topic

On 10/27/2021 at 4:13 AM, toripintar said:

Site URL: https://www.mountainprojectmt.com/train-anywhere-sign-up

I've been trying to figure out a way to make this page have a hamburger menu at all screen sizes but leave the rest of the pages alone. I can't quite figure it out. Anyone done this before?

 

Add to Design > Custom CSS

/* Signup page */
body#collection-6011c4c2a22b9e18b7d995d5 {
@media screen and (min-width:768px) {
 /* hide navigation */
    .header-nav {
    display: none;
}
/* Hide header button */
.header-actions {
    display: none;
}
/* show burger */
.header-burger {
  display: flex;
}
/* Show overlay mobile menu */
.header--menu-open .header-menu {
opacity: 1;
visibility: visible;
}}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 6 months later...
On 5/17/2022 at 12:29 PM, tillie said:

@tuanphan thank you for sharing this - the code works great! I am wondering if there is a way to reduce the size of the gaps between the menu items?

https://franklywrite.squarespace.com/home

password - FWweb1

 

Add to Design > Custom CSS

@media screen and (min-width:768px) {
div.header-menu-nav-item a {
    margin: 5px;
}}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 years later...
On 5/20/2022 at 6:41 AM, tuanphan said:

Add to Design > Custom CSS

@media screen and (min-width:768px) {
div.header-menu-nav-item a {
    margin: 5px;
}}

 

 

On 10/28/2021 at 11:11 PM, tuanphan said:

Add to Design > Custom CSS

/* Signup page */
body#collection-6011c4c2a22b9e18b7d995d5 {
@media screen and (min-width:768px) {
 /* hide navigation */
    .header-nav {
    display: none;
}
/* Hide header button */
.header-actions {
    display: none;
}
/* show burger */
.header-burger {
  display: flex;
}
/* Show overlay mobile menu */
.header--menu-open .header-menu {
opacity: 1;
visibility: visible;
}}
}

 

Hi @tuanphan, I tried using this code to achieve the same on a single page, but it's not showing the navigation links in the hamburger menu. My header navigation is also partially showing. I used the same code as above but switched out my body#collection ID, which is body#collection-66588e7bd03541145758635a. 

Website: https://www.lucasano.com/test

 

Link to comment
On 5/30/2024 at 9:40 PM, LukeDesign said:

 

Hi @tuanphan, I tried using this code to achieve the same on a single page, but it's not showing the navigation links in the hamburger menu. My header navigation is also partially showing. I used the same code as above but switched out my body#collection ID, which is body#collection-66588e7bd03541145758635a. 

Website: https://www.lucasano.com/test

 

Use this code

@media screen and (min-width:992px) {
body#collection-66588e7bd03541145758635a {
 /* hide navigation */
    .header-nav {
    display: none;
}
/* Hide header button */
.header-actions {
    display: none;
}
/* show burger */
.header-burger {
  display: flex;
}
/* Show overlay mobile menu */
.header--menu-open .header-menu {
opacity: 1;
visibility: visible;
}
    .header-nav-wrapper {
        visibility: hidden;
    }
}}

image.thumb.png.51df5aaa141a8dc97a3998c054b037de.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
2 hours ago, tuanphan said:

Use this code

@media screen and (min-width:992px) {
body#collection-66588e7bd03541145758635a {
 /* hide navigation */
    .header-nav {
    display: none;
}
/* Hide header button */
.header-actions {
    display: none;
}
/* show burger */
.header-burger {
  display: flex;
}
/* Show overlay mobile menu */
.header--menu-open .header-menu {
opacity: 1;
visibility: visible;
}
    .header-nav-wrapper {
        visibility: hidden;
    }
}}

image.thumb.png.51df5aaa141a8dc97a3998c054b037de.png

That did not work 

Link to comment
On 6/1/2024 at 4:16 PM, tuanphan said:

Use this code

@media screen and (min-width:992px) {
body#collection-66588e7bd03541145758635a {
 /* hide navigation */
    .header-nav {
    display: none;
}
/* Hide header button */
.header-actions {
    display: none;
}
/* show burger */
.header-burger {
  display: flex;
}
/* Show overlay mobile menu */
.header--menu-open .header-menu {
opacity: 1;
visibility: visible;
}
    .header-nav-wrapper {
        visibility: hidden;
    }
}}

image.thumb.png.51df5aaa141a8dc97a3998c054b037de.png

I just tested again and it still shows fine. Maybe you added to wrong position in CSS code. You can send all code after you added the code?

image.thumb.png.7334316d448de03e39e510377741085f.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
4 hours ago, tuanphan said:

I just tested again and it still shows fine. Maybe you added to wrong position in CSS code. You can send all code after you added the code?

image.thumb.png.7334316d448de03e39e510377741085f.png

I've added the CSS in the Custom CSS under Website Tools. I also tried it in the Page's header injector, but are not working. The below image is what happens:

image.thumb.png.9d6956bdf16cdfc4c3dffc0bfa82c874.png

I have a lot of CSS in my Custom CSS - you want me to send all of it?

Link to comment
On 6/5/2024 at 7:52 PM, LukeDesign said:

I've added the CSS in the Custom CSS under Website Tools. I also tried it in the Page's header injector, but are not working. The below image is what happens:

image.thumb.png.9d6956bdf16cdfc4c3dffc0bfa82c874.png

I have a lot of CSS in my Custom CSS - you want me to send all of it?

You can add code to top of Custom CSS box. And do not add it to Page Header Code Injection

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.