Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the Label color while click input field #669

Open
Kavin-Sunware opened this issue Jan 8, 2024 · 1 comment
Open

How to change the Label color while click input field #669

Kavin-Sunware opened this issue Jan 8, 2024 · 1 comment

Comments

@Kavin-Sunware
Copy link

I tried this css:
.my-phone-input:focus + .special-label {
color: blue;
}

@davidha99
Copy link

davidha99 commented Jan 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants