How to change form field focus colour


Topic: How to change form field focus colour

nathangrieve10 asked 9 months ago

How to change colour of form outline and focus text when clicking on a form field here -

https://mdbootstrap.com/snippets/jquery/ascensus/1135085

Thanks.


Grzegorz Bujański staff answered 9 months ago

Hi. You can overwrite this style:

.md-form.md-outline input[type="text"]:focus:not([readonly]) {
    border-color: red;
  box-shadow: inset 0 0 0 1px red;
}

.md-form.md-outline input[type="text"]:focus:not([readonly])+label {
    color: red;
}

Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: jQuery
  • MDB Version: 4.19.1
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes