Making menu items bold but leaving submenu items with normal font weight in Craft theme.

Making menu items bold but leaving submenu items with normal font weight in Craft theme.

Adrian1919
Tourist
4 0 1

Hi!

I'm new to Shopify, i'm currently doing my first store. I want to make my menu items bold and leave submenu items normal. However, the solutions I found online don't seem to work.

 

This code worked if I wanted to make all items (including submenus) bold.

 

.list-menu__item a {
  font-weight: 700;
}

 I asked ChatGPT if it can provide a solution and it came up with these options:

 

1.)

.list-menu__item:not(.list-menu__item--sub-menu) a {
  font-weight: 700;
}
2.)
<style>
  .site-header__menu li a {
    font-weight: bold;
  }
  .site-header__menu .sub-menu li a {
    font-weight: normal;
  }
</style>
However, none of these worked. My store link is www.cleanspire.hu if you wanna take a look.
Thanks in advance!


EDIT: After finding the HTML codes, I came up with this solution and it works:
 
.header__menu-item:not(.caption-large) {
  font-weight: 700;
}
Reply 1 (1)

KetanKumar
Shopify Partner
37598 3668 12156

@Adrian1919 

thanks for post its prefect work 

If helpful then please Like and Accept Solution. Partnership of your ️ Coffee Tips and my code can bring miracles.
Want to modify or custom changes on store Hire Me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing