Jump to content

Hamburger Menu Nav across all devices (version 7.1)

Go to solution Solved by inside_the_square,

Recommended Posts

Hey!

I'm using the new Squarespace 7.1 and am having some troubles finding any info on making the nav break at a certain point to enable the mobile hamburger icon for desktop. I don't want their typical nav for desktop, just wanting to have the hamburger icon across all devices. Thanks for any help!

https://chameleon-porcupine-c7jc.squarespace.com/

password: 1234

Link to comment
  • Solution

Hey @rsmith3074 - I realize you posted this weeks ago but I just now got back onto the forum and wanted to share the answer in case you still needed it! I use CSS to do this; this code does the trick for me. Hope it helps! 

 

.header-burger { display:flex!important}
.header--menu-open .header-menu {opacity: 1!important;visibility: visible!important;}
.header-nav, .header-actions {visibility:hidden!important}

 

 

🤓 Creator of InsideTheSquare.co
SQUARESPACE CIRCLE LEADER SQUARESPACE EXPERT SQUARESPACE EMPLOYEE EDUCATOR CERTIFIED CUSTOM CODE EXPERT

🗺️ New to Squarespace? Get your free roadmap: insidethesquare.co/roadmap
🙋‍♀️ New to CSS? Learn the basics for free: insidethesquare.co/learn
️ Ready to go pro? Get my custom code collection: insidethesquare.co/css

 

BeccaHarpain.gif.236d6ddd88c7d637645b762799f501a8.gif

 

Link to comment
  • 4 weeks later...
On 2/7/2020 at 5:50 PM, inside_the_square said:

Hey @rsmith3074 - I realize you posted this weeks ago but I just now got back onto the forum and wanted to share the answer in case you still needed it! I use CSS to do this; this code does the trick for me. Hope it helps! 

 


.header-burger { display:flex!important}
.header--menu-open .header-menu {opacity: 1!important;visibility: visible!important;}
.header-nav, .header-actions {visibility:hidden!important}

 

 

Hi! Inside the square, I love your yourtube channel. I use this CSS code. How do I center the logo afterwards? I tried the "Edit Site Header" but I get this ( see image)

788015434_ScreenShot2020-03-02at6_37_12PM.thumb.png.b2b7a2574603731f8df64d4135ca413e.png

Link to comment
  • 3 weeks later...
On 2/8/2020 at 8:50 AM, inside_the_square said:

Hey @rsmith3074 - I realize you posted this weeks ago but I just now got back onto the forum and wanted to share the answer in case you still needed it! I use CSS to do this; this code does the trick for me. Hope it helps! 

 


.header-burger { display:flex!important}
.header--menu-open .header-menu {opacity: 1!important;visibility: visible!important;}
.header-nav, .header-actions {visibility:hidden!important}

 

 Hey inside_the_square do you know how to make the hamburger menu display on the right hand side instead of left using this CSS in Squarespace 7.1?

When I currently shrink the browser window the hamburger is jumping from the left to the right so I just need it on the right the whole time please. 

 

Link to comment

Hey @tuanphan and @inside_the_square

How can we add other styling details, such as changing the background colour and aligning the text left, changing the line spacing and text colour?

I've tried adding things like background: #ffffff; but nothing is changing!

Edited by nancydesign
Link to comment
  • 4 weeks later...
  • 2 weeks later...
On 2/7/2020 at 2:50 PM, inside_the_square said:

@inside_the_square

Thanks so much for sharing! When I do as you suggested, it pushes the logo to strange spots in the header (as it did with others). In my case, the logo is meant to be centered. Any ideas on that? Would also LOVE to move the hamburger to the right side if anybody knows how to do that. 


.header-burger { display:flex!important}
.header--menu-open .header-menu {opacity: 1!important;visibility: visible!important;}
.header-nav, .header-actions {visibility:hidden!important}

 

 

 

Screen Shot 2020-05-03 at 10.11.14 AM.png

Link to comment
  • 2 weeks later...
  • 2 weeks later...
On 3/26/2020 at 6:20 PM, nancydesign said:

Hey @tuanphan and @inside_the_square

How can we add other styling details, such as changing the background colour and aligning the text left, changing the line spacing and text colour?

I've tried adding things like background: #ffffff; but nothing is changing!

I have a similar issue to @nancydesign I think. I can't work out how to control the background colour of the hamburger navigation. My white logo gets lost on the white background. 

image.thumb.png.d414c1e0147d2d1e6892cce4f9cd6a0b.png

 

Link to comment

@MartyMeh To style on  version 7.1.

Link Alignment:

.header-menu-nav {text-align: left!important; margin-left: 15%!important;}

Page Background color:

.header-menu-bg {background: red!important;}

Add image as background to Page: (replace with your image.)

.header-menu-bg {background-image: url('https://static1.squarespace.com/static/5e04314e1e03733084a0d51a/t/5ece9831d9f131439a22411a/1590598888064/Cork-City-Centre-at-Night.png'); 
  background-repeat: no-repeat;
  background-size: cover;}

Space between links:  

.header-menu-nav-item {line-height: 20px!important;}

Link text :
.header-menu-nav-item > a {color: green!important;}

 

Floating header is set in the Header Edit option. Select Style > and toggle to Fixed. 

- John

Edited by JOHNMD

mcgouran.john@gmail.com

Link to comment
  • 2 weeks later...

So if I wanted a hamburger menu across all devices on the left side and my logo fixed in the center, what would the code be?  Header Edit --> Style --> Fixed does not address the issue of the floating logo with the current CSS code.  The current CSS breaks the existing centered logo when "fixed" is toggled on.  Thanks.

Link to comment
  • 2 weeks later...
On 6/20/2020 at 2:10 PM, Asiya said:

@tuanphan 

 what if i want the humberger sign to have three lines? this code produces two lines humberger. 

 
  •  

You can replace burger icon with custom three lines (here is an example img)

Add to Home > Design > Custom CSS. Replace current image with three lines icon url

.burger-box div {
    display: none;
}
.burger-box {
    background-image: url(https://static.thenounproject.com/png/3143942-42.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

 

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
On 6/20/2020 at 2:10 PM, Asiya said:

@tuanphan 

 what if i want the humberger sign to have three lines? this code produces two lines humberger. 

 
  •  

You can replace burger with three lines icon

 Add to Home > Design > Custom CSS

.burger-box div {
    display: none;
}
.burger-box {
    background-image: url(https://image.flaticon.com/icons/svg/876/876207.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

 

 

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
On 6/20/2020 at 2:10 PM, Asiya said:

@tuanphan 

 what if i want the humberger sign to have three lines? this code produces two lines humberger. 

 
  •  

 Add to Home > Design > Custom CSS

.burger-box div {
    display: none;
}
.burger-box {
    background-image: url(https://image.flaticon.com/icons/svg/876/876207.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

 

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
  • 5 weeks later...
On 2/7/2020 at 4:50 PM, inside_the_square said:

Hey @rsmith3074 - I realize you posted this weeks ago but I just now got back onto the forum and wanted to share the answer in case you still needed it! I use CSS to do this; this code does the trick for me. Hope it helps! 

 


.header-burger { display:flex!important}
.header--menu-open .header-menu {opacity: 1!important;visibility: visible!important;}
.header-nav, .header-actions {visibility:hidden!important}

 

 

Hi! How can I show the social media icons afterwards? They seem to dissappear.

Link to comment
  • 4 weeks later...

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.