How to seperate elements within header

Solved
GFAD
Shopify Partner
6 0 3

I am trying keep our navigation menu as is, but move the search icon to the far right, y-axis centered, within the banner. I need to put seperate containers, but I'm not sure where the right place to start tweaking the code actually is... I want to do this:

 

GFAD_1-1696526845498.png

 

 

We have this:

 

Even just a nudge in the right direction would be a big help.

 

Thanks so much!

 

Accepted Solutions (2)
Made4uo-Ribe
Shopify Partner
4129 946 1153

This is an accepted solution.

Thank for the info, im just referring to example picture.

Do you mean like this? 

Made4uoRibe_0-1696536401675.png

If it is try this one then. 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
  • And Save.

 

 

.header>.header__search {
    grid-area: 1 / 3 !important;
    justify-self: end !important;
}

 

 

  • And Save.
Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


View solution in original post

Made4uo-Ribe
Shopify Partner
4129 946 1153

This is an accepted solution.

Yes, I check it but it seems you hide the wrong icon. 

Made4uoRibe_0-1697052119572.png

I see this one, you display it none. When I remove this the other serch icon come up. when you click it it goes to search. 

Made4uoRibe_1-1697052142070.png

Try this one. 

Add this in your base.css

@media screen and (min-width: 990px){
.header__icon--cart {
    display: none !important;
}
}

And Save. 

Then find the search icon in your base.css

Made4uoRibe_2-1697052496395.png

In the line 2569, youll see it and change the display: none to like this.

Made4uoRibe_3-1697052552090.png

And Save. 

I hope it help.

 

 

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


View solution in original post

Replies 8 (8)
Made4uo-Ribe
Shopify Partner
4129 946 1153

Hi @GFAD 

Do you mean next to the cart icon? Can I take a look? Would you mind to share store URL? Thanks!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


GFAD
Shopify Partner
6 0 3

https://greatfindsanddesign.com/

I do mean next to the cart. We have the cart hidden since we don't sell online, only in store.

Made4uo-Ribe
Shopify Partner
4129 946 1153

This is an accepted solution.

Thank for the info, im just referring to example picture.

Do you mean like this? 

Made4uoRibe_0-1696536401675.png

If it is try this one then. 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
  • And Save.

 

 

.header>.header__search {
    grid-area: 1 / 3 !important;
    justify-self: end !important;
}

 

 

  • And Save.
Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


GFAD
Shopify Partner
6 0 3

So I just realized that while this did work to move the search icon to the right it's overlapping with the cart icon so when people click on it they are directed to their empty card instead of the search unless they click in just the right spot. I tried re-aligning the cart icon to the right side of the header in the bass.css file but for some reason it isn't working.

GFAD
Shopify Partner
6 0 3

Sorry, I meant I tried moving the cart to the left side since I had moved the search to the right.

Made4uo-Ribe
Shopify Partner
4129 946 1153

This is an accepted solution.

Yes, I check it but it seems you hide the wrong icon. 

Made4uoRibe_0-1697052119572.png

I see this one, you display it none. When I remove this the other serch icon come up. when you click it it goes to search. 

Made4uoRibe_1-1697052142070.png

Try this one. 

Add this in your base.css

@media screen and (min-width: 990px){
.header__icon--cart {
    display: none !important;
}
}

And Save. 

Then find the search icon in your base.css

Made4uoRibe_2-1697052496395.png

In the line 2569, youll see it and change the display: none to like this.

Made4uoRibe_3-1697052552090.png

And Save. 

I hope it help.

 

 

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


Moeed
Shopify Partner
3046 760 924

Hey @GFAD 

 

Could you please provide your Store URL and, if applicable, the Password too? Your cooperation is greatly appreciated!

 

Best Regards,
Moeed

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
GFAD
Shopify Partner
6 0 3