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

Sign-Up Form Component Using HTML, CSS and Vanilla JS

Sky 945

@Skyz03

Desktop design screenshot for the Intro component with sign-up form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hello 👋, This is my second JS challenge, I finally completed the challenge but I do I an issue and need some valuable feedback which is whenever the input value is backspaced the form size seem to grow and I could not find the real cause behind it. Also for the ````error-imgandborderispseudo:classa better option ortoggle``` in JS. Thank you for your valuable feedback.

Community feedback

Katie 405

@kem522

Posted

Good work!

I believe the form changes size when someone deletes any value from the input fields because of the error message that shows up - it's positioning is messing with the document flow and shifting things around.

Instead of positioning the error messages relative to the inputs, you could wrap both the input and associated error span in a div:

<div class="input-wrapper">
    <input class="form-input" type="text" name="first" placeholder="First Name" required>
        <span class="error"></span>
</div>

Then they are semantically associated with one another and they will be stacked on top of one another without any extra CSS, the CSS for the error class would be something like:

.class {
    width: 100%;
    padding: 0;
    font-size: 80%;
    color: #f00;
    display: inline-block;
    text-align: left;
}

Hope that makes sense!

Marked as helpful

1

Sky 945

@Skyz03

Posted

@kem522 Thanks for the great feedback it worked out

0
Talha 120

@TalhaAmjad0034

Posted

You should add padding to main section so that interactivity don't effect the outer area. Don't let it grow on its own add some margin and padding to outer the main section. 😀

Stop user to add bunch of blanck spaces to verify that name field and include 6 or 8 characters for password validity. 🙂

Good Work! Keep coding!! 💝

1

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