Topic: How to change SelectOption text color?

CartoonNetwork159 pro asked 5 years ago


https://imgur.com/a/qD1K8zn

I use MDBSelectInput component inside MDBModalBody component and text color of MDBSelectOption component is grey. (see in my figure)

How to change text color of all options?

Thanks you.


Anna Morawska staff answered 5 years ago


Hi there,

just add this piece of code to one of your css files, for example index.css. Don't forget to import it somewhere.

Best, Ania


CartoonNetwork159 pro commented 5 years ago

Thanks a lot, I've added !important to custom css and it's work!


Anna Morawska staff commented 5 years ago

ok, happy to hear that, happy coding :)


Anna Morawska staff answered 5 years ago


Hi there,

please try to overwrite it with your custom CSS rule, e.g.:

.dropdown-content li > a, .dropdown-content li > span {
    color: red;
}

Best, Ania


CartoonNetwork159 pro commented 5 years ago

which component of SelectInput to overwrite with this custom CSS ?



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.11.1
  • Device: iMac
  • Browser: Google Chrome
  • OS: MacOS
  • Provided sample code: No
  • Provided link: Yes
Tags