Jump to content

How do i fix a navigation bar that is out of alignment?

Go to solution Solved by Ziggy,

Recommended Posts

I used the following code to create a secondary navigation with a centered logo:

 

<script src="//ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript">
   $(function() {
   $(".header-display-desktop .header-nav-item:nth-child(n+4)") .prependTo (".header-actions--right");
});
</script>

 

However, the navigation on the left will default to two lines if the screen is smaller - there is a lot of padding in between the logo and on the side of the left screen. Additionally, the give button at the top right is being cut off the screen. I just wanted to figure out how to adjust either the spacing or to make sure everything is centered and aligned correctly. At the very least to fix the button being cut off at the top right.

Anyone know how I might fix this?

Screen Shot 2022-12-16 at 10.01.02 AM.png

Edited by undergroundnetwork
Link to comment

Can you share the website URL?

It looks like on smaller screens that the header actions box is not big enough to accommodate the addition of the two navigation items. I would suggest that you should only implement this style change when the screen is  big enough to take this layout.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment
  • Solution

You can try this Custom CSS, it adjusts the widths of the containers in the header, may not be perfect, but a start:

.header-title-nav-wrapper {
    flex: 0 0 60%;
}
.header-layout-branding-center .header-title {
    width: 10%;
    flex: 1 1 10%;
}
.header-layout-branding-center .header-actions {
    width: 40%;
}

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

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.