How to change the main menu underline to a box when hover?

Solved

How to change the main menu underline to a box when hover?

SupGold96
Excursionist
12 0 2

Hi,

 

Please guide me on how to change the underline to a box when it is hover and with the change of colour. 

 

Thank you.

 

my website is: https://cheesecakebased.com/

Accepted Solutions (2)

Moeed
Shopify Partner
4941 1305 1584

This is an accepted solution.

Hey @SupGold96 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag.

{% if template == 'index' %}
<style>
li:hover {
    border: 1px solid black;
}
</style>
{% endif %}

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

Best Regards,
Moeed

 

-Need a Shopify Specialist? Chat on WhatsApp
- Custom Design | Advanced Coding | Store Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️

View solution in original post

Zqdo
Shopify Partner
803 32 63

This is an accepted solution.

Go to your theme customizer, click on the header, scroll to where it says Add Custom CSS, and try this code:

.link--text:hover {
    color: rgba(var(--color-foreground),.75);
    border: 2px solid;
    background: #fff2f8;
}

.header__menu-item:hover span {
    text-decoration: none;
}

 

How does that look?

banned

View solution in original post

Replies 6 (6)

Moeed
Shopify Partner
4941 1305 1584

This is an accepted solution.

Hey @SupGold96 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag.

{% if template == 'index' %}
<style>
li:hover {
    border: 1px solid black;
}
</style>
{% endif %}

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

Best Regards,
Moeed

 

-Need a Shopify Specialist? Chat on WhatsApp
- Custom Design | Advanced Coding | Store Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
SupGold96
Excursionist
12 0 2

Hi, is it possible to take away the underline too? and fill the inside of the box color?

Zqdo
Shopify Partner
803 32 63

On which section of the website do you want to include this feature?

banned
SupGold96
Excursionist
12 0 2

main menu.

I want to remove the underline and replace with box filled with color when hover

Zqdo
Shopify Partner
803 32 63

This is an accepted solution.

Go to your theme customizer, click on the header, scroll to where it says Add Custom CSS, and try this code:

.link--text:hover {
    color: rgba(var(--color-foreground),.75);
    border: 2px solid;
    background: #fff2f8;
}

.header__menu-item:hover span {
    text-decoration: none;
}

 

How does that look?

banned
SupGold96
Excursionist
12 0 2

Thank you so much!