word-wrap for select control not working in Firefox but working in Chrome

Viewed 235

Below code for the select control which has select option. Code is working in Chrome. It should be in multiline for selected value but when same check with Firefox it doesn't break the lines.

Chrome is working perfect

enter image description here

Firefox doesn't work

enter image description here

select {
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: pre-wrap;
  height: 150px;
  width: 150px;
  display: inline-block;
}
<div style="width: 150px">
  <select name="question" id="question">
    <option value="">Select</option>
    <option value="What was your childhood nickname?">
      What was your childhood nickname?
    </option>
    <option value="In what city did you meet your spouse/significant other?">
      In what city did you meet your spouse/significant other?
    </option>
    <option value="What is the name of your favorite childhood friend?">
      What is the name of your favorite childhood friend?
    </option>
    <option value="What street did you live on in third grade?">
      What street did you live on in third grade?
    </option>
    <option
      value="What is your oldest sibling's birthday month and year? (Please use this format: January 1900)"
    >
      What is your oldest sibling's birthday month and year? (Please use this
      format: January 1900)
    </option>
  </select>
</div>

0 Answers
Related