最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Change color of active link to navigation menu

programmeradmin1浏览0评论

I would link to change the color of the active menu item on my navigation menu (the link I am currently vistiting). I have tried the following css but it has not worked!

.wp-block-navigation-item .current-menu-item .wp-block-navigation-link { color: #365ABA !important; }

my website

Any suggestions?

I would link to change the color of the active menu item on my navigation menu (the link I am currently vistiting). I have tried the following css but it has not worked!

.wp-block-navigation-item .current-menu-item .wp-block-navigation-link { color: #365ABA !important; }

my website

Any suggestions?

Share Improve this question asked Feb 8 at 14:13 NefelistraNefelistra 1 New contributor Nefelistra is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Add a comment  | 

1 Answer 1

Reset to default 0

Consider changing the CSS to:

.wp-block-navigation-item.current-menu-item .wp-block-navigation-item__label {
  color #365ABA !important;
}

Please note, this only works on the Πρότζεκτς and Γνωρίστε μας menu items. As these are the only pages that get the current-menu-item class when on their respective pages. For the other menu items, you may need to look at re-adding the menu items such that their metadata remains intact. The current menu item heulistics need this metadata to be able to match the page with the menu item.

发布评论

评论列表(0)

  1. 暂无评论