Submitted over 1 year ago
Newsletter sign-up form with success message
@CodageWithRahul
Design comparison
SolutionDesign
Solution retrospective
In this solution Everything is fine but i am not satisfied with my page responsiveness
Community feedback
- @enesekenPosted over 1 year ago
You should add some styles for setting input valid or invalid
Utils css
.text-danger{ color: red } .border-danger{ border: 1px solid red } .d-none{display:none}
<p class="valid-email-text d-none">Valid email required</p> <input id="email" class="border-1 p-3 rounded" type="email" required placeholder="[email protected]" oninvalid=" this.classList.add('text-danger', 'border-danger'); document.querySelector('.valid-email-text').classList.remove('d-none');" oninput=" this.classList.remove('text-danger', 'border-danger'); document.querySelector('.valid-email-text').classList.add('d-none');" />
Give me a star please :(
https://github.com/eneseken/front-end-mentor/tree/main/newsletter-sign-up-with-success-message-main
0
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