79526519

Date: 2025-03-21 20:25:00
Score: 0.5
Natty:
Report link

I see what you mean, but I don't fully understand why you see this as a problem ? if there aren't enough space you've at least 2 solutions

  1. Cropping and showing the text isn't full, and adding a label on mouse hover to see the full text

  2. Increasing the text container height, and breaking the text going on a new line

Going on a new line and increse select height

I think the crop is prettier so here how you would do it in your code

select {
  width: 100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
problem:
<select>  <option>IJREFOEIJFEFIJEIJIJIIJIJREFOEIJFEFIJEIJIJIIJIJREFOEIJFEFOIFEIJEIJIJIIJIJREF_OEIJFEFIJE</option>
  <option>IJREFOEIJFEFIJEIJIJIIJIJREFOEIJFEFIJEIJIJIIJIJREFOEIJFEFIJEFEFFIJIJIIJIJRE_FOEIJFEFIJE</option>
  <option>IJREFOEIJFEFIJEIJIJIIJIJREFOEIJFEFIJEIJIJFEIJIIJIJREFOEI__JFEFIJEIJIJIIJIJREFOEIJFEFIJE</option>
</select>

no problem:
<select>
  <option>ddd</option>
  <option>ddd</option>
  <option>ddd</option>
</select>

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: jguillaumeso