Feature suggestion: Show title on mouseover on overflowing nav items
See original GitHub issueContribution guidelines
- I’ve read the contribution guidelines and wholeheartedly agree
I want to suggest an idea and checked that …
- … to my best knowledge, my idea wouldn’t break something for other users
- … the documentation does not mention anything about my idea
- … there are no open or closed issues that are related to my idea
Description
If a nav item has a very long title, the title is truncated with ellipsis, which is good to prevent the nav from scrolling horizontally. (This may be Insiders only, not sure.)
However, it would be nice if users could see the full title on mouseover, like this:

Basically, I can see two solutions for this:
- Add a
title
attribute to all nav items. This can easily be done by modifying thenav-item
partial. However, this creates a lot of redundancy, especially on large doc projects with huge navs. - Add a
title
attribute to overflowing nav items only. This can be done using JS. See code below. (Yes, it’s jQuery! Heresy! But to get an idea.)
// Add title to overflowing nav links
$(".md-ellipsis").each(function () {
if (this.offsetWidth < this.scrollWidth) {
$(this).attr("title", $(this).text().trim());
}
});
Use Cases
See description.
Screenshots / Mockups
No response
Issue Analytics
- State:
- Created a year ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Showing the description on mouseover - Stack Overflow
1 Answer 1 · Yeah it worked perfectly. · Is it really necessary to use bootstrap to show the title in tool tip?...
Read more >Our Faves: Top 12 Navbar Hover Effects and Effects on Click
In this post, we have collected some of the most creative navbar demos ... get a menu that stacks items into a dropdown...
Read more >Dropdown | Webflow University
Select a dropdown link; Open Style panel > Selector field and open the dropdown; Choose Hover from the States menu. Once selected, a...
Read more >Tooltips - Bootstrap
Documentation and examples for adding custom Bootstrap tooltips with CSS and JavaScript using CSS3 for animations and data-attributes for local title storage.
Read more >title - HTML: HyperText Markup Language - MDN Web Docs
Other tags such as <p> surround and provide information about document text and may include other tags as sub-elements. Browsers do not display...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Insiders 4.15.0 was just released and comes with improved support for tooltips 🎉 This release also includes the behavior mentioned above, automatically adding a tooltip to overflowing navigation titles.
Thanks for suggesting! As a general note, I’m working on better hover behavior for elements with titles (including abbreviations specifically), and fixing this issue will be a part of it. It might take some time, but the logic is the same, so it wouldn’t make sense to solve this specifically.
In the mean time, the following script should mitigate the issue (adapted from your code example to remove jQuery):
Note that will only work in Insiders, since it makes use of the refactoring of the navigation structure to support icons.