How to link the of the wp_nav_menu (2 posts)

  1. Matt
    Posted 2 years ago #

    My apologies if the title is confusing. I'm trying to edit a theme such that the <a>is outside the <li> in the Main menu, so that I can make each list item look like a button that can be clicked even when the cursor isn't over the text.

    Much appreciated!

    [Please post markup between backticks or use the code button.]

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    I'm trying to edit a theme such that the is outside the

  3. in the Main menu
  4. Short answer: you can't. That would be very badly broken markup. Inline tags (eg <a>) cannot enclose block-level tags (eg <li>). You should be able to achieve a button effect using pure CSS.

Topic Closed

This topic has been closed to new replies.

About this Topic