Jump to content

Editing header navigation layout

Recommended Posts

I am wanting to adjust the layout of the navigation links in my header. The templates provided in site styles do not satisfy the layout that I want and I have yet to find any code that does what I want. 

1880380069_ScreenShot2022-01-19at11_30_13AM.thumb.png.ace462ee4116d0e965d4b62884aba7a7.png

All I want to do is move "Contact" to the right side of the header and leave "Work" on the left side. I am able to add a button but the buttons do not achieve the clean look I am wanting. Does anyone have any suggestions on how to achieve this fix?

Link to comment
On 1/21/2022 at 11:08 PM, krollins said:

I have a personal plan. 

Here is my URL

https://krollinsdesign.com/

Add to Design > Custom CSS

div.header-nav-item:nth-child(2) {
    position: absolute;
    right: 0;
    z-index: 999;
}

image.thumb.png.8f356e1f82ace756ad57954fbccd2f23.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
  • 3 months later...
On 5/12/2022 at 7:38 AM, nataliaf said:

tuanphan, pls can i ask if you have 6 pages in the menu, does the code change? at the moment i copied the one above and the second item moves to the right

Change number 2 in the code to n+3. It should be

div.header-nav-item:nth-child(n+3) {
    position: absolute;
    right: 0;
    z-index: 999;
}

If it doesn't work, please share link to your site, 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
On 5/21/2022 at 5:06 PM, nataliaf said:

thank you so much- i've added the code but it's not quite working- the site is https://clementine-tambourine-aws4.squarespace.com/ with pw 1234 - it will be a business account but i haven't paid to publish yet

If you use a Business Plan or higher, we have a better code to achieve this

First remove above code

Next, add this code to Home > Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
  $(document).ready(function() { 
		$('nav.header-nav-list').clone().insertBefore('.header-actions.header-actions--right>.showOnMobile');
	});
</script>
<style>
  .header-nav nav>div:nth-child(n+4) {
    display: none;
}
.header-actions.header-actions--right>nav>div:nth-child(-n+3) {
    display: none;
}
.header-actions.header-actions--right>nav:nth-child(2) {
    display: none;
}
.header-nav-item:not(:last-child) {
    margin-right: 1.5vw;
}
</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

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.