Jump to content

Extend Navigation Bar (with CSS?!)

Recommended Posts

Hi @all,
this is my first post and I really hope I just overlooked something.

website: https://christinakapl.at

So it seems like the navigation bar is bound to be in the center (which is fine by me) and it intended to place a button on the right which I removed as I don't need it there. However on my 15" monitor the last item of the menu is displayed in a second row, which doesn't look right. I understand that it needs to create a second line at some point but I think 4 items should fit into a menu bar....

The space is big enough, so I wouldn't find the need to change the font size, also because  I think it would change it site wide if changed in the style settings. Is there a way to just extend the field for the navigation bar? Does it need to be extended via CSS?

Thankful for any ideas on that.

Bildschirmfoto 2024-09-17 um 21.58.24.jpg

Link to comment
  • Replies 2
  • Views 385
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

1 hour ago, christina_ckg said:

So it seems like the navigation bar is bound to be in the center (which is fine by me). However on my 15" monitor the last item of the menu is displayed in a second row, which doesn't look right.

Hi @christina_ckg 👋

You can have the navigation in the center or you can choose to have it on the left or right. You can choose by clicking the EDIT DESIGN button that's shown in your screenshot.

image.thumb.png.673e9021d46808afd17824d9e4ac784c.png

By default, the desktop header is divided into thirds. The site title/logo is assigned 33%, the navigation is assigned 34% and the actions area on the right is assigned 33%:

image.thumb.png.537de332919b6d941fe5a7c8892cf618.png

There isn't a style setting that allows you to assign more space to the desktop navigation, but you can achieve this with some Custom CSS:

image.thumb.png.ad1ed06d4b4b52cda31751904c09cfc6.png

For example:

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

.header-layout-nav-center .header-nav {
    width: 60%;
    flex: 1 0 60%;
}

.header-layout-nav-center .header-actions {
    width: 20%
}

You can adjust to meet your needs. 

Did this help? Please give feedback by clicking an icon below  ⬇️

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Would you like your customers to be able to mark their favourite products in your Squarespace store?

Link to comment
11 hours ago, paul2009 said:

 

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

.header-layout-nav-center .header-nav {
    width: 60%;
    flex: 1 0 60%;
}

.header-layout-nav-center .header-actions {
    width: 20%
}

 

 

Could you help me with this code adjusted to the header option with site title in the middle and navigation to the right?

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.