slcollins Posted November 17, 2023 Posted November 17, 2023 Hello, I have customized my navigation to include color and font changes on hover. I have set the active links to be bold. The issue that I am having, is that I have a folder with links inside. Once I select one of those links, all of the links are bold instead of just the active link. I have included 3 images for easy viewing. An image activating the dropdown by hovering over the Work link from the home page. The folder links show correctly. An image hovering over the links within the folder dropdown. The text style and the background act as expected. An image of the selected link from the previous image. As you can see, all of the text is bold. I am wanting only the active link to be bold. I do have my site live so you can see what is happening. https://www.sonyacollins.me/ Here is the code that I am using. I feel like the code is way overkill, but it just wasn't working at all without going in depth. If you have any ideas to clean it up, I'm def game. //---START Nav Style Color .header-nav .header-nav-item--folder .header-nav-folder-content { padding: 0!important;text-align: center!important;right: -3.1em!important; } //---End Nav Style Color //---START Remove line from Nav .header-nav-folder-item--active .header-nav-folder-item-content {background-image: none!important; } //---End Remove line from Nav //---START Remove line within menu folder .header-nav-item--active a {background-image: none!important;font-weight: bold!important;color:#fff!important; } //---End Remove line within menu //---START Adjust Padding on medu folder .header-nav-folder-item {min-width: 20px!important;padding:10px 10px!important;} //---End Adjust Padding on medu folder ///---START Folder NAV hover .header-nav-folder-item:hover {background: #8da8bb!important;font-weight: bold!important; } //---End Folder NAV hover
tuanphan Posted November 19, 2023 Posted November 19, 2023 Change this CSS code .header-nav-item--active a { background-image: none !important; font-weight: bold !important; color: #fff !important; } to this .header-nav-item--active>a, .header-nav-folder-item.header-nav-folder-item--active * { background-image: none !important; font-weight: bold !important; color: #fff !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment