Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 3 years ago

Tip Calculator App using HTML, CSS, and JS

pmork7•150
@pmork7
A solution to the Tip calculator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I really wanted to add space between the caret and the input text for each of the inputs but I wasn't able to figure out how to do it. I have seen it suggested online to use the letter spacing property. I tried using a pseudo-element to select the first letter in the input and add letter spacing but that didn't seem to work. If you know how to do this let me know!

I found the most time-consuming part of the project to be writing the javascript to manage the input behavior. I wanted to add more specific error messages depending on the state of the input but I decided not to in the interest of saving time.

I'm not sure what the best settings are for the height of the body. I'd like to know how to vertically center the main content in the desktop view. I made the body a flexbox and I set justify-content to center but it still seems like it's sitting high up on the page.

I'd be curious to know what decision other people made about how many characters to allow for each input. I only allowed three characters for the custom tip input, six for the bill input, and four for the number of people input.

I hope you liked this one. Please let me know what improvements could be made.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on pmork7'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
Frontend Mentor logo

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

Frontend Mentor

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

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

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub