Home > database >  React js: How can i apply style on tags between select options in html?
React js: How can i apply style on tags between select options in html?

Time:07-07

I want to style span wrapped between option tag

  <select>
    <option value="option1">Active Wallet <span style={{fontWeight:'bold!important'}}>mBTC</span></option>
    <option value="option2">Option 2</option>
    <option value="option3">Option 3</option>
  </select>

CodePudding user response:

There are only a few style attributes that can be applied to this element.

You have to use some external plugin/library,

There is more info: How to style the option of an html "select" element?

  • Related