Jump to content

Navigation width

Go to solution Solved by Web_Solutions,

Recommended Posts

  • Solution
7 hours ago, harlowbogie said:

Password: yoga

Hi, how can I make the navigation container wider? I want to keep the same distance between the nav item links, I just don't want the nav items to wrap when in tablet view. So I want that container to be as wide as possible so nav items don't wrap.

Thanks in advance!

 

https://coral-elk-m3e7.squarespace.com

Password: yoga

image.png.5d2310c2dc9787272aad3ff9cc80d3e6.png

Add these code on Custom CSS panel in Website Utilities Website Tools > Custom CSS.

.header-layout-nav-center .header-actions {
    width: 25%;
}
.header-layout-nav-center .header-title {
    flex: 1 1 1%;
}

 

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Link to comment
  • 2 months later...
On 3/25/2024 at 12:22 AM, askdkym said:

this solution doesn't work for me.  https://carpediem.yoga

You can use this CSS code

nav.header-nav-list {
    flex-wrap: nowrap;
}
.header-title-nav-wrapper {
    margin: 0 !important;
}
.header-display-desktop {
    justify-content: center !important;
    flex-direction: column;
}

 

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 weeks later...
  • 3 months later...
On 7/15/2024 at 7:48 AM, askdkym said:

Hi Tuan, the problem has returned!

I am starting to sell courses on my website, and now the Login link is wrapping LOL

can you help me please?

Thank you!

Capture.PNG

Login in a different container

You can use this code to Website Tools > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  $(document).ready(function(){
    $('.header-actions.header-actions--right>.user-accounts-link').appendTo('nav.header-nav-list');
});
</script>
<style>
  nav.header-nav-list>.user-accounts-link+.user-accounts-link {
    display: none !important;
}
</style>

 

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

Now the Login link doesn't show, and all the menu items are aligned to the left instead of the center 😬

I had to delete that code to restore functionality to my website.

Capture.PNG

Edited by askdkym
Link to comment
On 7/17/2024 at 1:11 PM, askdkym said:

Now the Login link doesn't show, and all the menu items are aligned to the left instead of the center 😬

I had to delete that code to restore functionality to my website.

Capture.PNG

I see you removed Login link. Do you still need help?

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

Use this new code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  $(document).ready(function(){
    $('.header-actions.header-actions--right>.user-accounts-link').appendTo('nav.header-nav-list');
});
</script>
<style>
  nav.header-nav-list>.user-accounts-link+.user-accounts-link {
    display: none !important;
}
  div.user-accounts-link {
    margin-left: 0px !important;
}
</style>

then save & reload the site.

If it still doesn't work, you can keep code in Code Injection, I can check reason 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.