How to change the Label color while click input field
Kavin-Sunware opened this issue · comments
KAVIN C commented
I tried this css:
.my-phone-input:focus + .special-label {
color: blue;
}
David Hernandez commented
<div class="control-group">
<label class="control-label" for="inputEmail">Firstname</label>
<div class="controls">
<input type="text" id="inputEmail" placeholder="Firstname">
</div>
</div>
.control-group:has(input:focus) label{
color: red;
}
You can check this post: On input focus change color of label. How?