0

Box-icon is displaying successfully outside . But I can't display box-icons inside .

<select class="form-select form-control" aria-label="Select Icon" id="new_category_icon">
  <option value="1"><i class="bx bx-block"></i></option>
  <option value="2"><i class='bx bx-bar-chart-alt-2'></i></option>
  <option value="3"><i class='bx bx-bar-chart-alt-2'></i></option>
</select>
corasphinx
  • 61
  • 2
  • 10
  • [Look at the docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option) - only `text` content is permitted – Professor Abronsius Oct 15 '22 at 09:40
  • Is there no way to display – corasphinx Oct 15 '22 at 09:43
  • 1
    Not with vanilla HTML. There might be other alternatives out there but you cannot even use the pseudo selectors (`:before/:after`) to apply styles. [possible solution](https://stackoverflow.com/questions/36743041/font-awesome-icon-in-select-option) – Professor Abronsius Oct 15 '22 at 09:46

0 Answers0