Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 7
    this works reasonably well! when you use tabindex=-1 the item is still focusable, but only by mouse, not keyboard, which is better in this case. you can also use an outline:0 style to remove the blue border when focused Commented Feb 28, 2018 at 10:33
  • this is works for me, I tried using :active and :hover for custom dropdown and while using @TylerH answer can help, but if you doesn't want to add any html you can use this solution instead Commented May 4, 2023 at 7:40