Responsive signup form with CSS and basic JS

Solution retrospective
I didn't actually figured out how to apply JavaScript. When I don't input eg. name and code make validation, I didn't know how to change frames to red and how to add exclemation mark icon and message "First Name cennot be empty".
Please log in to post a comment
Log in with GitHubCommunity feedback
- @MarziaJalili
Amazing work! 🔥
🌟 Here's the answer to your question:
✅ style.border = "red" is not valid because the border property needs more info (like width, style, and color). Just "red" alone isn’t a proper value, buddy. That's why it's not working.
✅ You've got two choices to fix it tho:
1️⃣ If you only want to change the border color:
style.borderColor = "red"
2️⃣ If you want to set the full border in one go, you can do:
document.querySelector("input").style.border = "2px solid red";
This sets width, style, and color all together.
Give it a go — it will definitely click! 😎
Join 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