Skip to content
Discussion options

You must be logged in to vote


For the issue where the dropdown content isn't showing directly below the trigger, you might want to check out the solution in [this GitHub issue](#418). Here's a possible fix:

  1. Try wrapping each DropdownMenuItem inside a NavigationMenu to force the dropdown to show up right under the trigger.

  2. In the ui/navigation-menu.tsx file, you can adjust the dropdown’s position like this:

    <div 
      className={cn(
        "absolute left-1/2 top-full flex -translate-x-1/2 transform justify-center",
      )}
    >

    This will replace the original:

    <div className={cn("absolute left-0 top-full flex justify-center")}> //line 86

    This should make the dropdown show right under the trigger and centered.

After you make …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lsbyerley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants