Jump to content

Prevent navigation stacking in two lines

Go to solution Solved by tuanphan,

Recommended Posts

Site URL: https://carlotta-notaro.squarespace.com/

Hello! My site is https://carlotta-notaro.squarespace.com/   Password: mollystupida

My navigation stacks into two lines on smaller screens:

128654874_navlinksstacked.thumb.jpg.3e61e14b954337cd31aea95c5063626e.jpg

So I used a code from the kind @tuanphan  to un-stack it:

.header-title-nav-wrapper {
  flex: 1 0 85% !important;
  flex-wrap: nowrap !important;
}
.header-nav {
  width: 100% !important;
  flex: 1 1 100% !important;
}

 

It puts my navigation links in one nice line, but now the links aren't horizontally centered:

473047308_navlinksunstackedbutnotcentered.thumb.jpg.8e81f4dbe014b5ce51b7af900cd54aa8.jpg

 

I would like to horizontally re-center my navigation links like this:

728600211_mygoal.thumb.jpg.c292edaa6de7b2fc7224c8e6217ef977.jpg

Do you have any CSS code snippets to re-center my navigation links horizontally, in the middle of the header?

Thanks in advance! 🙂

 

Link to comment
  • 6 months later...
  • 5 months later...

Hello, I am finishing a website, and I am having a similar problem. Below 1500px my menu is on 2 lines.

Do you have a code to avoid this problem? Maybe we should go from a computer menu to a phone menu when viewing the site below 1500px what do you think?

Thank you for your help, attached the screenshots,

the website link: https://elenadellutri.squarespace.com/
password: 5636

Capture d’écran 2022-02-08 à 18.36.43.png

Capture d’écran 2022-02-08 à 18.36.56.png

Capture d’écran 2022-02-08 à 18.37.12.png

Link to comment
On 2/9/2022 at 12:41 AM, Prismaze said:

Hello, I am finishing a website, and I am having a similar problem. Below 1500px my menu is on 2 lines.

Do you have a code to avoid this problem? Maybe we should go from a computer menu to a phone menu when viewing the site below 1500px what do you think?

Thank you for your help, attached the screenshots,

the website link: https://elenadellutri.squarespace.com/
password: 5636

Capture d’écran 2022-02-08 à 18.36.43.png

Capture d’écran 2022-02-08 à 18.36.56.png

Capture d’écran 2022-02-08 à 18.37.12.png

You can consider changing to Burger Menu in specific screen sizes with custom CSS

What do you think? 

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
  • 1 year later...
On 8/8/2023 at 3:46 AM, kimmydesign said:

Hi there, I am having the same issue as @prismaze, how do I tell it to go to a burger menu below a certain screen size?

Depend on your header layout. What is your site url? We can help easier

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...

Hi! We are also having a problem with our menu (raleighcustomhomes.com) going to two lines when you shrink the window (we are open to it going to a hamburger style menu, or the font size shrinking with window size)- on the right side, our social handles also cross over into our logo in the center - do you know of any way to fix either of those? Thanks!

Link to comment
On 3/4/2024 at 11:33 PM, allieraehay said:

Hi! We are also having a problem with our menu (raleighcustomhomes.com) going to two lines when you shrink the window (we are open to it going to a hamburger style menu, or the font size shrinking with window size)- on the right side, our social handles also cross over into our logo in the center - do you know of any way to fix either of those? Thanks!

You can use this code to Website > Website Tools > Custom CSS

nav.header-nav-list {
    flex-wrap: nowrap;
}

image.png.aefaf83864576871a12aecdaf31f76ae.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
  • 6 months later...
On 3/7/2024 at 2:18 AM, tuanphan said:

You can use this code to Website > Website Tools > Custom CSS

nav.header-nav-list {
    flex-wrap: nowrap;
}

image.png.aefaf83864576871a12aecdaf31f76ae.png

Hey @tuanphan - I want to do this for my client's website medium - rare . com , but I don't want it to overlap with the logo. Is there a way to balance this so that when it hits the centered logo it just converts to the hamburger menu? 

Screenshot 2024-09-12 at 3.38.14 PM.png

Link to comment
3 hours ago, Trentwann said:

Hey @tuanphan - I want to do this for my client's website medium - rare . com , but I don't want it to overlap with the logo. Is there a way to balance this so that when it hits the centered logo it just converts to the hamburger menu? 

Screenshot 2024-09-12 at 3.38.14 PM.png

Yes. We can force burger on specific screen size. You can share site url, I can check & adjust CSS easier.

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.