bluzky / nice-select2

A lightweight vanilla javascript library that replaces native select elements with customizable dropdowns
https://bluzky.github.io/nice-select2/
MIT License
361 stars 60 forks source link

overflow text #68

Closed ajrulrn closed 9 months ago

ajrulrn commented 1 year ago

if have an option with a long text the display will be like this

image

onebitrocket commented 10 months ago

try adding the following css to these classes.

.nice-select {
   max-width: 100%;

   /* added just in case */
   width: 100%; 
}
.nice-select .current,
.nice-select .multiple-options {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    /* added just in case */
    max-width: 100%;
}
ajrulrn commented 9 months ago

try adding the following css to these classes.

.nice-select {
   max-width: 100%;

   /* added just in case */
   width: 100%; 
}
.nice-select .current,
.nice-select .multiple-options {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    /* added just in case */
    max-width: 100%;
}

thanks, it's works.

sorry for late reply