• I’m using Twenty Twenty Three (wordpress 6.1) and have wanted to remove the current item from the navigation. I headed over to customize.php so that I can enter custom CSS.

    I’ve entered
    .current-menu-item {display:none}

    and when I go view the page the items is still there and the display:none has a line through it in the CSS..

Viewing 3 replies - 1 through 3 (of 3 total)
  • That normally means that there’s another rule that over-riding your selector.

    We’ll need to see a link to a page that you’re using so we can see the CSS rules that are applied.

    Hi @bostonmacosx

    You can use !important rule, if you use the?!important?rule, it will override all previous styling rules for that specific property on that element!

    EX:-

    .current-menu-item {
      display:none !important;
    }
    
    

    Kindly refer this article to learn more about this

    https://www.w3schools.com/css/css_important.asp

    Thread Starter bostonmacosx

    (@bostonmacosx)

    !important did work … I had a brain thing and forgot about that.

    as a second question is there a better way to edit the CSS then customize.php in the URL …?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Not able to set display:none to current-menu-item’ is closed to new replies.