Topic: Style select options

dhermann premium asked 2 years ago

Expected behavior I would like to style individual options inside of an mdb select. It looks like there are only a few attributes that are passed into the elements and even the ids appear to be random so I cannot target with external CSS. Is there a way to do this? If not, can this feature be added?

Keep in mind that I want to style individual options, not all options, so targeting .select-option in my CSS is not sufficient.

Actual behavior No ids, classes, or styles can be passed from the option elements that will appear in their respective elements.

Resources (screenshots, code snippets etc.)

Mateusz Lazaru staff answered 2 years ago


currently the only way to style options is via CSS selectors. Use nth-child to style them individualy.

dhermann premium answered 2 years ago

Thank you. I think adding a way to style individual options through attributes or just class options would be great. If possible, please add it to the upgrade list.

Mateusz Lazaru staff commented 2 years ago

Thank you for sharing your opinion with us. I've added this feature to our ideas section in ToDo list.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 4.1.0
  • Device: Desktop
  • Browser: Safari
  • OS: macOS Monterrey 12.0.1
  • Provided sample code: Yes
  • Provided link: Yes