Responsive Landing Page using html/css/javascript
Design comparison
Solution retrospective
Struggled a bit with a problem caused by the content overflowing the body element. Realized that since I assigned a height of 100% for both the HTML and BODY, it was wrong to give the MAIN element a height of 100% as well, as you want it to pay attention to the height of the content inside of it not what is available by its parents.
Let me know if you have a better approach, and thank you for your time!
Community feedback
- @skyv26Posted almost 3 years ago
Hi! Abdullah, Really nice work, even it is responsive too. But still there are some issues in your work and it takes only 20 min max to fix all issues that I am going to tell you via this feedback
-
The main part of this challenge is email validation and I would say you made it nice, I mean the custom message and icon you placed perfectly. But your email validation logic is not 100% correct. As I tried abc@gef and hit button then it successfully submit without any issue. So I think it should need to fix.
-
In your mobile view your text content and email submit button is not aligned properly. I mean in mobile view your button is touching the right edge of mobile screen and your main text need some margin at both side (left and right) in order to make it little bit good to eye.
Overall Nice work. I hope you understand above minor issues.
Best of luck
Marked as helpful0@AbNassifPosted almost 3 years ago@skyv26 Much appreciated man! I thought that the email validation would be solved by Making the javascript check for both "@" and ".com", but for some reason that didn't work. I'll fix the mobile view in a bit.
Would you mind telling me how you'd approach the javascript validation for the form? Do you rely on .includes() (es6)? I'll research it as well but would love an opinion of a professional for this specific challenge.
Thank you for your time <3
1@skyv26Posted almost 3 years ago@AbNassif use regular expression for your email validation
0@effycocoPosted almost 3 years ago@skyv26 I think there is a reason why type="email" consider "abc@gef" as valid, so is it really necessary to add validation for ".com"?
1@skyv26Posted almost 3 years ago@effycoco Absolutely yes.
take a scenario like you are doing work in a company (Maybe you are really working) and your company a buy subscription of emails and suppose 100 emails per day. and you made a landing page in order to get the leads or collect data by offering something to users in exchange of email. Then you know sometimes user entered wrong email and suppose 10 people already entered wrong email then according to 80/20 rule, company get lose of 10% (approx and ideal example). On the other hand maybe company collects email because they want to sent the product marketing email then it will definitly impact the company financially.
I hope you understand 😀
GOOD LUCK
0@effycocoPosted almost 3 years ago@skyv26 What I mean is that an actual email address does not need to end with ".com". Refer tohttps://stackoverflow.com/questions/201323/how-can-i-validate-an-email-address-using-a-regular-expression
1@skyv26Posted almost 3 years ago@effycoco Hi! Wang, Well it is pretty sure, that if suppose you have created your account as [email protected] and I made account with [email protected] and suppose this same email validation functionality is given, now we just entered abc@def, tell me you will recieve email or I will ?
I will wait for your answer.
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