Change focus Input outline and label color


Topic: Change focus Input outline and label color

Macjohn asked 4 years ago

I would like to change the blue focus color on outlined input fields. How do I do this?

Here is an example field that I am using:

<div class="form-outline">
    <input 
        type="text" 
        id="useraccount" 
        class="form-control" 
        value="
    >
    <label class="form-label" for="useraccount">Brugernavn</label>
    <div id="useraccount-validation" class="valid-feedback"></div>
</div>

Grzegorz Bujański staff answered 4 years ago

You need to add an extra css overwriting border color. Look at this snippet: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/2852722#html-tab-view


Macjohn answered 4 years ago

Ah! Thanks! That worked.

I am sorry - but I assumed that the Label color would follow the border color. But of course it doesn't, and that is a good thing.

But I actually need to change the focused label color also?


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: 3.0.0
  • Device: Laptop
  • Browser: Any
  • OS: MacOS
  • Provided sample code: No
  • Provided link: No
Tags