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

Intro Component With Sign Up Form

SyuusukeFujiโ€ข 90

@SyuusukeFuji

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


What specific areas of your project would you like help with?

The error icons. I asume there most be some easier way to keep their position.

Community feedback

P
Koda๐Ÿ‘นโ€ข 2,020

@kodan96

Posted

hi there! ๐Ÿ™Œ

<div class="wrapper">
    <input type="text" required class="data-field" name="" id="field-name" placeholder="First Name">
    <img id="error-icon1" src="images\icon-error.svg" class="error-icon" alt="error icon">
    <p id="error-msg1" class="error-msgs">First name cannot be empty</p>
</div>

Create a section like this for all the input fields in the form, then apply

.wrapper {
position: relative;
}

.error-icon {
position: absolute;
right: 2rem; 
transform: translateY(-50%)
}

You might need to play around with the transform or give right a negative value, but this should position it. ๐Ÿ“

Hope this was helpful ๐Ÿ™

Good luck and happy coding! ๐Ÿ’ช

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