Jump to content

Moving Cart Icon + Search Bar in Header

Recommended Posts

Site URL: https://www.divinesouldice.com

Hello there, I was hoping someone could help me with some header questions. I wanted to move the location of the shopping cart icon to the left side of the header (in line with the social media icons) as well as the search bar (to the right of the page navigation links). When I attempted to do it on my own the central logo and navigation links moved far to the left and overall looked very wonky/not centred.

Thank you very much! I appreciate any and all help!

Screen Shot 2021-11-12 at 12.06.24 PM.png

Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

On 11/13/2021 at 2:15 AM, DivineSoulDice said:

Site URL: https://www.divinesouldice.com

Hello there, I was hoping someone could help me with some header questions. I wanted to move the location of the shopping cart icon to the left side of the header (in line with the social media icons) as well as the search bar (to the right of the page navigation links). When I attempted to do it on my own the central logo and navigation links moved far to the left and overall looked very wonky/not centred.

Thank you very much! I appreciate any and all help!

Screen Shot 2021-11-12 at 12.06.24 PM.png

You can try adding to Home > Settings > Advanced > Code Injection

<script>
  	//Move header cart in the right of social icon
	(function(){
    document.addEventListener('DOMContentLoaded',()=>{
        document.querySelector('.header-display-desktop .header-actions-action--social').appendChild(document.querySelector('.showOnDesktop .header-actions-action--cart'));
    });
})()  
</script>


<style>
  /*Position the header search bar*/
  .header-title-nav-wrapper  .header-search-bar {
    position: absolute;
    right: 80px;
  }
</style>  

Let me know how it works on your site

Press 👍 or mark this answer as solution to help another one too

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

My testing result

image.thumb.png.b10ef0b35addcd0c4000bec81a18723e.png

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. 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.