Topic: Change form label color when in focus/active
bobdempsey83 pro asked 6 years ago
Necrozma free answered 5 years ago
how do i get onto settings on focus
Grzegorz Bujański staff commented 5 years ago
Hi, Could You Please Clarify, what do you want to do?
If I understand correctly you want change style on focus? Then you need try something like that:
.md-form:focus { color: #CC0000; }
Best, Grzegorz
Marta Wierzbicka staff answered 6 years ago
bobdempsey83 pro commented 6 years ago
Ok thanks very much!Marta Wierzbicka staff commented 6 years ago
I've just got the idea for textarea label. You need to add a new class to .md-form wrapper of textarea. Try this: .primary-textarea.md-form label.active { color: #4285F4; }bobdempsey83 pro commented 6 years ago
Hey here's the working example: Change form color & label on focus .navy-blue-skin textarea.md-textarea:focus:not([readonly])+label Change input color on focus: .navy-blue-skin textarea.md-textarea:focus:not([readonly]) Thanks again for the help! :)Marta Wierzbicka staff commented 6 years ago
You're welcome.Marta Wierzbicka staff answered 6 years ago
.md-form input[type=text]:focus:not([readonly]) + label { color: #CC0000; }
Best,
Marta
bobdempsey83 pro commented 6 years ago
Hey thanks so much Maria. That code worked for my name & email inputs, but not the textarea. Do you have anything that will work for the textarea? Thanks!FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No