Design comparison
SolutionDesign
Solution retrospective
Can someone help me with how to make input field red?
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
Hello there 👋. Congratulations on successfully completing the challenge! 🎉
- I have other recommendations regarding your code that I believe will be of great interest to you.
INPUT 🔴 :
- There's a easy way to do that, you can use
:invalid
pseudoclass in css along withinput
to throw the red colored border whenever the user entered wrong email. We don't need js for this. Lets look an example below
input:invalid { border: 1px solid red; }
- That's all you got a nice red border whenever the email is wrong!
.
I hope you find this helpful 😄 Above all, the solution you submitted is great !
Happy coding!
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord