Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Newsletter sign-up form with success message

@CodageWithRahul

Desktop design screenshot for the Newsletter sign-up form with success message coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


In this solution Everything is fine but i am not satisfied with my page responsiveness

Community feedback

Enes Eken 540

@eneseken

Posted

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 GitHub
Discord logo

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