Ellipsis on selected item of dropdown #1883
Replies: 5 comments 2 replies
-
Override via /* double .ui.ui is needded to increase specificity and successfully override the settings */
.ui.ui.dropdown .menu > .item {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
} |
Beta Was this translation helpful? Give feedback.
-
ok, i recognized you want it only for the selected entry. There is no fomantic way, as it would also need a fixed width. You then have to adjust this yourself via css |
Beta Was this translation helpful? Give feedback.
-
Would you to set ellipsis using JS instead of CSS? |
Beta Was this translation helpful? Give feedback.
-
Can you help me with CSS code? |
Beta Was this translation helpful? Give feedback.
-
@smartm0use @media only screen and (min-width: 767.98px) {
.ui.dropdown > .text {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
max-width: 33vw; /* This is according to your jsfiddle which uses a 3-col layout */
}
} |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have a dropdown with items having long text and they go ahead instead of having ellipsis. And this is fine for me.
But I would like to have ellipsis on the selected item only.
This is my dropdown:
If I select an item I get this:
Instead, I would like to have this:
Any way to do it in a "Fomantic way" or do I need to apply to any CSS rule?
Beta Was this translation helpful? Give feedback.
All reactions