Jump to content

Reposition Login/Account - Desktop Header Nav

Go to solution Solved by tuanphan,

Recommended Posts

Hi,

I'm trying to move the customer login / account element in the header of my site's desktop navigation.

I'd like to move it directly under the contact link, so it sits with all the other nav links.It's positioned fine on the mobile version.

Please note: I'm using custom code to split the layout of the desktop navigation around the site logo.  I'm not sure if that is causing an extra headache.

I've spent quite a bit of time trying to get it to work with custom script in the footer, but I cannot figure it out.  I got it to move but 'login account' text were simultaneously displayed and it was nested within contact.

Please could someone help me?  Thank you for reading.

www.jamesgadbury.com

password is: Gadders

site header login.png

Edited by James-Gadbury
Link to comment
  • Solution

Add this code to Website > 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() { 
		$('div.header-display-desktop div.user-accounts-link').insertAfter('.header-nav:nth-child(3) nav>div:nth-child(7)');
	});
</script>

image.thumb.png.5f25a5d98d038184758d7d7f6fe9349e.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

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.