It is debatable which approach is correct. Chrome and Firefox both essentially do the same thing, but with a slight difference in how they handle text alignment. While Chrome aligns the text to the left, Firefox aligns it to the right. The <option>
elements are configured for ltr
, leading to an expectation of typical left-to-right behavior for the text. However, there seems to be a semantic dispute regarding whether the styling rules of the selected <option>
should still apply when the <select>
is inactive. Exploring the relevant RFCs may provide some insight, but convincing Mozilla that they are in error could be a challenge.
You have two potential options: either allow the width of the <select>
element to expand freely to accommodate the text, or opt for a different approach altogether by constructing the desired interface using <div>
elements, CSS, and Javascript. While neither solution may be ideal, finding a perfect solution may prove elusive.