Changing current-menu-item in Wordpress

2019-09-17 18:39发布

I'm designing a website for a client which has a long menu, which stems to another line. I want to add a different colour for the menu items that are on the second line, so i need to change the current-menu-item only for those menu items - i assigned a class of .nav2 to those menu items originally in order to change the a:hover for said items.

If anyone could help me with that it would be great.

标签: css wordpress
2条回答
SAY GOODBYE
2楼-- · 2019-09-17 18:57

I'm going to take a stab in the dark here as your question was very confusing:

.current-menu-item.nav2  {
    background: red;
}
查看更多
欢心
3楼-- · 2019-09-17 18:57

For wordpress:

.menu .current_page_item a
{
  background:#000;
}
查看更多
登录 后发表回答