Jump to content

How to extend the website navigation bar horizontally using CSS

Go to solution Solved by Web_Solutions,

Recommended Posts

Posted (edited)

Hello,

I use the layout shown in the screenshot for the header on my website.  I would like to extend the navigation menu, which is symbolized by the three squares in the layout settings, horizontally.  I have already increased the link spacing to 5 vw in the settings. Unfortunately, this is nowhere near enough to achieve the desired spacing between the individual navigation links.

Is it possible to extend the navigation menu horizontally as far as I want by inserting CSS-Code?

Many thanks in advance.

Bildschirmfoto 2024-01-25 um 13.21.10.png

Edited by JulianSt
  • Replies 9
  • Views 2.7k
  • Created
  • Last Reply

Top Posters In This Topic

Posted
3 hours ago, JulianSt said:

Hello,

I use the layout shown in the screenshot for the header on my website.  I would like to extend the navigation menu, which is symbolized by the three squares in the layout settings, horizontally.  I have already increased the link spacing to 5 vw in the settings. Unfortunately, this is nowhere near enough to achieve the desired spacing between the individual navigation links.

Is it possible to extend the navigation menu horizontally as far as I want by inserting CSS-Code?

Many thanks in advance.

Bildschirmfoto 2024-01-25 um 13.21.10.png

Yes, Can you share your website URL?

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.


 

Posted
10 minutes ago, JulianSt said:

Here is the code. Add these code on Custom CSS panel in Website Utilities Website Tools > Custom CSS. You can increase decrease the spacing by changing the value 5vw to as you want.

.header-layout-branding-center-nav-center .header-title-nav-wrapper .header-nav .header-nav-item {
    margin-left: 5vw !important;
    margin-right: 5vw !important;
}

 

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.


 

Posted

Many thanks for the quick reply.


If I increase the spacing even further, a menu item slides down from the navigation menu and a second row is formed. Is it possible to prevent this?

I would like the two outer navigation menu items to be visually flush with the image below.

Thank you very much for your help.

Bildschirmfoto 2024-01-26 um 01.53.28.png

  • Solution
Posted
5 minutes ago, JulianSt said:

Many thanks for the quick reply.


If I increase the spacing even further, a menu item slides down from the navigation menu and a second row is formed. Is it possible to prevent this?

I would like the two outer navigation menu items to be visually flush with the image below.

Thank you very much for your help.

Bildschirmfoto 2024-01-26 um 01.53.28.png

Add this code also.

.header-layout-branding-center-nav-center .header-title-nav-wrapper {
    flex: 0 0 100% !important;
}

 

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.


 

  • 2 months later...
Posted
On 4/11/2024 at 8:21 PM, morgancreativeco said:

The issue is that my logo and navigation links are not centered on the page (presumably because of the social media links on the left side of the header?) How can I fix this issue? @Web_Solutions

You have added this code to you website. Remove this code.

.header-layout-branding-center-nav-center .header-title-nav-wrapper {
    flex: 0 0 100% !important
}

After then add this code.

.header-display-desktop .header-title-nav-wrapper {
    flex: 0 0 80% !important
}
.header-display-desktop .header-actions{
    flex: 0 0 10% !important;
}

 

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.


 

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.