Design comparison
Solution retrospective
DAY 1-5 20 DAYS OF CODE CHALLENGE HerTechTrail
Day 1-5 Details
This is a repo for Day 1-5 of 20 days of code challenge HerTechTrail. For Day 1-5 we were required to replicate a given sign up form, style it with CSS, make it responsive and also host it.
Table of content
Project Task
Users should be able to:
- sign up with the form
Links
- Solution URL (https://github.com/masha-a-m/day1-5_20_Days_of_Code_Challenge_HerTechTrail)
- Live Site URL (https://lucky-biscuit-5c0c3a.netlify.app)
My Process
I started this project a week ago. It was a bit hectic for me but with research on different sites, I finally finished it.
Built With
- HTML5 Markup
- CSS Styling
- JavaScript
What I Learnt
I leant how to make a sign up form with many CSS components
Useful Resources
https://codereview.stackexchange.com/questions/114760/student-registration-form
https://stackoverflow.com/questions/20260798/creating-registration-form
Author
- Website - MARYAM GARBA
- Twitter - MARYAM GARBA
Community feedback
- @sliyarliPosted about 1 year ago
Your HTML and CSS code looks good for the most part, but I noticed a couple of issues and some room for improvements:
HTML Issues:
1 - In your HTML form, there are missing closing angle brackets (
>
) for the input elements - For example:<input type="text" placeholder="First Name" id="first"
Should be:
<input type="text" placeholder="First Name" id="first">
2 - The "Terms and Services" text within the
<span>
in your HTML should be properly closed with</span>
- Update this part:<p> By clicking the button, you are agreeing to our <span> Terms and Services</span> </p>
To:
<p> By clicking the button, you are agreeing to our <span> Terms and Services</span>. </p>
CSS Issues:
1 - There's a typo in the CSS for the
box-sizing
property - It should bebox-sizing
, but you haveboz-sizing
:*{ padding:0; margin:0; boz-sizing: border-box; /* should be box-sizing */ font-family: 'Poppins', sans-serif; }
JavaScript Issues:
1 - There's a typo in your JavaScript code when checking the
firstName
variable - You have:var firstname = first.value.trim();
It should be consistent with your variable name:
var firstName = first.value.trim();
2 - In the JavaScript code, you have this block of code duplicated for first name validation:
if (firstName === ''){ errorFunc(first, 'First Name cannot be empty') } else { successFunc(first) }
You should replace the second
successFunc(first)
withsuccessFunc(last)
for the last name validation.3 - In the
successFunc
function, you should also remove thesuccess
class when an input is in error state - You can do this by usingclassList.remove('success')
in addition to adding theerror
class.With these adjustments, your code should work correctly - Make sure to test it thoroughly to ensure everything is functioning as expected.
Marked as helpful0
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