classlesscss icon indicating copy to clipboard operation
classlesscss copied to clipboard

Dropdown menu title have to be a link

Open gbetous opened this issue 1 year ago • 1 comments

Hi,

Thanks a lot for such a great work !

I noticed that if the dropdown menu item is not a link, the menu is horizontal instead of vertical.

You can try the homepage example simply modifying 'Menu ▾' item and you'll see the dropdown menu displayed horizontally.

<nav>
  <ul>
    <li>Brand</li>
    <li class="float-right sticky">Sticky Right</li>
    <li><a href="#">Item </a></li>
    <li>Menu ▾
      <ul>
        <li><a href="#">Menu 1</a></li>
        <li><a href="#">Menu 2</a></li>
      </ul>
    </li>
    <li class="float-right">Collapse</li>
  </ul>
</nav>

Is it on purpose ? How to fix that if I want to allow text only menu title ?

Thanks !

gbetous avatar Nov 15 '24 18:11 gbetous

Hi @gbetous, thanks for reaching out. The title does not need to be a link but it needs to be an element. Just plain text does not work (yet). You could put it inside a span element (<span>Menu ▾</span>) for a workaround.

I will look into this when I have time maybe I can improve it so that plain text also works.

emareg avatar Dec 05 '24 13:12 emareg

Closing, since I could not find a solution and the problem is easy to solve.

emareg avatar Jul 11 '25 12:07 emareg