I’m using the Horizon theme for my website. I want to highlight the only menu item named “The Hover Tee” like a pill shape same in hover, selected and in normal too. I’ll attach the reference.
website: https://qa6achapmlfbluek-70858047625.shopifypreview.com
password: staple
@Sivadarshan
There are multiple way to achieve this, one of the way is below.
{% if link.title contains 'The Hover Tee' %}
hightlight-menu
{% endif %}
The use .hightlight-menu to add background to the menu.
Thanks
Hello @Sivadarshan
- From your Shopify Admin, navigate to Online Store > Themes > Edit Code
- In the Assets folder, open base.css and add your CSS code at the end
nav a[href*=“the-hover-tee”],
.header__menu a[href*=“the-hover-tee”] {
background-color: #000;
color: #fff !important;
padding: 6px 14px;
border-radius: 9999px;
font-weight: 500;
display: inline-block;
transition: background-color 0.3s ease;
}
nav a[href*=“the-hover-tee”]:hover,
nav a[href*=“the-hover-tee”]:focus,
nav a[href*=“the-hover-tee”].is-active,
.header__menu a[href*=“the-hover-tee”]:hover,
.header__menu a[href*=“the-hover-tee”].is-active {
background-color: #000;
color: #fff !important;
}