Re: box around the word in the navigation bar when the mouse cursor hovers over it

Solved

box around the word in the navigation bar when the mouse cursor hovers over it

corneliorrr
Shopify Partner
27 0 5

I'd like to have a box around the word in the navigation bar when the mouse cursor hovers over it instead of a single dash underneath it Screenshot 2023-05-31 150535.pngScreenshot 2023-05-31 192906.png

Accepted Solution (1)
Made4uo-Ribe
Shopify Partner
8363 2000 2460

This is an accepted solution.

Sure. Takes time for me to find the underline selector..😆

ul.list-menu.list-menu--inline span:hover {
    padding: 5px;
}

You can add this one on the first code that I give they have same selector, only the padding: 5px

.header__menu-item:hover span {
    text-decoration: none;
    text-underline-offset: 0rem;
}

I hope it help. 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.

View solution in original post

Replies 7 (7)

Made4uo-Ribe
Shopify Partner
8363 2000 2460

Hi @corneliorrr ,

Would you mind to share your URL website with password? 

Thanks!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
corneliorrr
Shopify Partner
27 0 5
Made4uo-Ribe
Shopify Partner
8363 2000 2460

Thank you for the information. 

I understand that you want the box instead of underline when hover. 

Try this code. 

  1. From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  2. Find the theme that you want to edit and click on "Actions" and then "Edit code".
  3. In the "Assets" folder, click on "theme.scss.liquid, styles.scss.liquid or base.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:
  4. And Save.

 

ul.list-menu.list-menu--inline span:hover {
    border: 1px solid black;
}
span.header__active-menu-item {
    text-decoration: none;
}

 

  • Result:
  • Ribe_Dagandara_0-1685556980755.png

    I hope it help. 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
corneliorrr
Shopify Partner
27 0 5

Ah, thank you! And would it also be possible to enlarge the box a little and then remove the original line

Made4uo-Ribe
Shopify Partner
8363 2000 2460

This is an accepted solution.

Sure. Takes time for me to find the underline selector..😆

ul.list-menu.list-menu--inline span:hover {
    padding: 5px;
}

You can add this one on the first code that I give they have same selector, only the padding: 5px

.header__menu-item:hover span {
    text-decoration: none;
    text-underline-offset: 0rem;
}

I hope it help. 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
corneliorrr
Shopify Partner
27 0 5

Perfect, you helped me a lot! Thank you!

Made4uo-Ribe
Shopify Partner
8363 2000 2460

Welcome, Happy to help. 😊

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.