Hi, I’m looking a solution for a filed border color. But I need it only when the filed has typed data.
Please advice
Hi, I’m looking a solution for a filed border color. But I need it only when the filed has typed data.
Please advice
You could modify the CSS to achieve this. Here is an example code:
input[type=text]:focus {
border: 3px solid #555;
}
Give it a try and let me know how that goes!
Hi. Thank you!
…but it’s a partial success. The “focus” css code gives me the border when I’m typing, but how to keep the border for filled filed?
Hi Giovanni,
You could modify the code a little bit and add this code:
input:valid {
border: 3px solid black;
}
It’ll only apply when the input field has been filled.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.