-
Right now the TOC displays the full Header text, which depending on the length results in it being put on two lines in total. I now ask if there is some way (Maybe CSS?) to shorten the displayed text, so that it wouldn't go on a new line.
Is this doable? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I think there are several ways of achieving what you want:
|
Beta Was this translation helpful? Give feedback.
-
FINALLY got it to work... .md-nav--secondary li.md-nav__item > .md-nav__link {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
} This now properly cuts the text and suffixes it with a Either way, it works now and I'm happy. |
Beta Was this translation helpful? Give feedback.
FINALLY got it to work...
The problem was, that the nav is set to a flex, so I had to change the display to a block for the
.md-nav__link
part, which resulted in this CSS snippet to use:This now properly cuts the text and suffixes it with a
...
.I kinda wanted to use
fade
tho, but apparently is it no longer a thing despite what the Mdn docs say.Either way, it works now and I'm happy.