Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Change focus Input outline and label color

Macjohn free 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>

Macjohn free 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?


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



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

  • ForumUser: 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