Header Navigation Link Button Hover Complex Code

Header Navigation Link Button Hover Complex Code

ellacoker
Shopify Partner
287 1 74

Hello,

I would like my header buttton links to go into a blob shape on hover - kind of similar to screenshot attached. however, i would like each link to be a different blob shape. I am unsure how to achieve this. I have tried n-th childs but it doesnt seem to be working! Please see screenshots attached. Any help appreciated. Ella

URL: https://sausagesociety.myshopify.com/

PW: ellaella

Screenshot 2025-05-02 at 09.24.39.pngScreenshot 2025-05-02 at 09.27.50.png

Replies 2 (2)

BiDeal-Discount
Shopify Partner
468 53 110

Hi @ellacoker 

Let try like this:

.header__inline-menu ul li:nth-child(2) a:hover{
 border-radius:  30px 60px 20px 50px;
}

Do the same with other list items.

- Helpful? Like & Accept solution!
- BiDeal Bundle Volume Discounts: Upsell with bundles, quantity breaks, volume discounts. AOV+ with gifts, shipping & progressive cart
- Bify app: Shopify automatic discount solutions
- Contact me? support@bify.app or WhatsApp: +84974709330

tim
Shopify Partner
4459 531 1630

Here is your HTML structure (a bit reduced)

<ul>
  <li>
    <a ... class="header__menu-item list-menu__item link link--text focus-inset">
      <span>.../span>
    </a>
  </li>
  <li>...</li>
  ...
</ul>

 

Therefore, .header__menu-item is always first child of its immediate parent;  it's actually  the only child.

so you need to apply :nth-child to <li> elements, as @BiDeal-Discount suggested:

li:nth-child(1) .header__menu-item:hover { border-radius: 50px 20px 40px 10px }
li:nth-child(2) .header__menu-item:hover { border-radius: 30px 60px 20px 50px }
li:nth-child(3) .header__menu-item:hover { border-radius: 70px 10px 30px 60px }
li:nth-child(4) .header__menu-item:hover { border-radius: 40px 30px 60px 20px }

 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com