Jump to content

Navigation changes to two lines when the screen gets smaller

Recommended Posts

Hello, my website is doing the same thing. On my left screen the navigation is fine, but on the right screen my navigation is stacked.

thetenmg.com

 

I've tried EVERY code linked here. The only one that seemed to force it to move was the one below, however it shifted the logo in the center and broke the navigation so that none of the links were active anymore. Can anyone help me fix the stacking issue?

.header-nav {
  position: absolute;
  width: 60vw !important;
  left: 50%;
  transform: translateX(-50%);
}

.header-actions--right {
  width: 20vw !important;
}
Link to comment
18 minutes ago, Leanne_M said:

I'm having the same issue when I view my site on my laptop. I've tried the CSS options mentioned above but none of them have made the navigation budge at all. 

https://bamboo-rabbit-99gt.squarespace.com/config/
password: !(cX3Ly@$323cC(

Thank you!

Try adding to Home > Design > Custom Css

/*center navigator 1 line*/
.header-title-nav-wrapper {
  flex: 1 0 85%;
}
.header-layout-nav-center .header-nav {
  width: 70%;
  flex: 1 1 70%;
}

Let me know how it works

Support me by pressing 👍 if this useful for you

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

My testing

image.thumb.png.4318ab75d0f466c0e06800055dc04dfe.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
  • 1 month later...

HI, i hope i can still get some feedback here. I have tried to prevent nav link stacking in the header with this code:

.header-nav {

    width: 90% !important;

    flex: 1 1 90% !important;

}

#logoWrapper {display: block !important;     padding-top: 40px;

   margin: auto !important;}

 

header{

   position: fixed;

   height: 190px;

   padding: 0px;

   text-align: center;

  #header #headerNav {

   display: inline-block;

   margin-top: 45px;

   text-align: center;

   margin-right:;

}

#headerNav nav a {

   padding-left: 15px;

   padding-right: 15px;}

}

BUT what happens is it reduces the size of the logo and sends everything to the right. Is there a simple code fix?

url: https://hampersfor.com.au   (live site)

Thanks, Kathy

Link to comment
On 4/1/2022 at 4:16 PM, Kath_HampersFor said:

HI, i hope i can still get some feedback here. I have tried to prevent nav link stacking in the header with this code:

.header-nav {

    width: 90% !important;

    flex: 1 1 90% !important;

}

#logoWrapper {display: block !important;     padding-top: 40px;

   margin: auto !important;}

 

header{

   position: fixed;

   height: 190px;

   padding: 0px;

   text-align: center;

  #header #headerNav {

   display: inline-block;

   margin-top: 45px;

   text-align: center;

   margin-right:;

}

#headerNav nav a {

   padding-left: 15px;

   padding-right: 15px;}

}

BUT what happens is it reduces the size of the logo and sends everything to the right. Is there a simple code fix?

url: https://hampersfor.com.au   (live site)

Thanks, Kathy

Can you take a screenshot of problem? We can check 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
22 hours ago, Kath_HampersFor said:

Notice, that as the page size reduces, the navigation links begin overlapping the logo (i think my code above somehow stopped the stacking into 2 lines) ...see image below

Screen Shot 2022-04-04 at 6.57.55 pm.png

I think we can change it to burger style on some smaller screen sizes. 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
On 4/5/2022 at 2:59 PM, Kath_HampersFor said:

How do you do that?

 

Add to Design > Custom CSS

/* Show burger from 1200px to 1300px */
@media screen and (min-width:1200x) and (max-width:1300px) {
 /* hide navigation */
    .header-nav {
    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
  • 8 months later...
18 hours ago, MistyPhotos said:

I am having the same problem but none of the above code works.  Could someone take a look and help me out?


Thanks!

Misty

falcon-khaki-f3fl.squarespace.com


password: 

Siskinhospital2022!

You can consider forcing mobile menu appears on some screen sizes

Or add this to Design > Custom CSS to force nav always on 1 line

.tweak-header-primary-nav-hover-style-active .Header-nav .Header-nav-inner {
    display: flex;
    flex-wrap: nowrap;
}

 

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 months later...
On 3/15/2023 at 12:45 AM, torjusos said:

I'm having the same issue with my website. The navigation bar breaks into two lines when in a smaller window. None of the codes above worked for me.

torjusostmoen.squarespace.com

Add to Design > Custom CSS

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

 

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 months later...
On 6/12/2023 at 11:32 PM, dmharris34 said:

Hey all, I am having the same issue with my website: Sunsetlake.org. The nav breaks into multiple lines and begins to stack.

Screenshot 2023-06-12 at 9.29.35 AM.png

Screenshot 2023-06-12 at 9.31.29 AM.png

We can reduce items text size or force header to mobile header on this screen size. Which screen size do you see problem? 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
  • 9 months later...

I'm having the same issue with goodmorningagency.uk (pw: goodmorning)

I added the CSS recommended above and it did keep everything on one line, but it shifted the centralized logo and navigation to the left. 

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

Any thoughts to keep the navigation on one line without shifting the nav to the left?

Link to comment
On 3/14/2024 at 10:10 PM, JBallard said:

I'm having the same issue with goodmorningagency.uk (pw: goodmorning)

I added the CSS recommended above and it did keep everything on one line, but it shifted the centralized logo and navigation to the left. 

Any thoughts to keep the navigation on one line without shifting the nav to the left?

Did you solve? It looks fine to me

image.thumb.png.235eda17b174e21cf5118e41f1c4053e.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

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.