Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Age Calculator App

Daniyal Master•290
@daniyalmaster693
A solution to the Age calculator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I started by creating all the HTML elements and assigning them classes. Next, I started to work on the card, where I added a box shadow, set the height and width propeties, added the border properties, and changed some small things like margin and padding. Then, I moved onto the inputs, where I worked on small detials like the border radius, outline and border colors, fonts and more. Now, I worked on the result CSS, where I changed the color of the span, made the font style italic, and set some small properties. I also worked on the HR, where i changed the color, and the calculate button, where I positioned and scaled the image. Next, I moved onto the Javascript part of the project, where I defined the variables for elements. Then, I created elements for the different values of things in the script, such as age values and more. I defined some parameters for my calculate function, that would tell the Javascript engine what to do and display, based on if the day value was more or less then the current value. I also created a function for the errors, where I set the styles based on what was typed into the Input. Once I finished, I tested the website on multiple browsers, added some responsive design using media queries, and used the built-in device size emulation feature to view what the website would look like on different devices.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Daniyal Master's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License