Responsive age calculator app using HTML, SCSS and JS
Design comparison
Solution retrospective
Hello devs,
It would be very appreciated if you give me your feedback about the feel and appearance of the app and the code structure.
Thanks in advance for your help
Community feedback
- @danielmrz-devPosted 9 months ago
Hello @asmaahamid02!
Your project looks great!
I have one suggestion for you to improve it even more:
- Using
margin
is not the best option to center an element. Here's a very efficient (and better) way to place an element in the middle of the page both vertically and horizontally:
📌 Apply this to the body (in order to work properly, don't use position or margins):
body { min-height: 100vh; display: flex; justify-content: center; align-items: center; }
I hope it helps!
Other than that, great job!
2@asmaahamid02Posted 9 months ago@danielmrz-dev Hello Daniel. I really appreciate your help and attention. Actually I didn'r intend to center the div in the middle of the page but I noticed now that it should be centered and modified the code.
You're absolutely right about not using margins for centering but that was not the purpose of margins in my code.
Thanks alot
1 - Using
- @muthucodesPosted 9 months ago
The month number keeps increasing continuously. I think there is a bug with how number of months is calculated.
The layout looks accurate and all other functionalities are working well. Loved the way numbers animate to arrive at their value. Also, the label and input border is changing to red if values are not valid. Great attention to detail.
1@asmaahamid02Posted 9 months ago@muthucodes thank you for your honest feedback and attention. I just wonder where the month is increasing? Do you mean in the input or the result? I rechecked it and didn’t find this bug
0@muthucodesPosted 9 months ago@asmaahamid02 It keeps increasing in the result. Input for which this happened: 23 / 2 / 2000
Marked as helpful1@asmaahamid02Posted 9 months ago@muthucodes Thank you so muc. It is fixed now!
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