Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Tip Calculator App using HTML, CSS, and JS

pmork7 150

@pmork7

Desktop design screenshot for the Tip calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

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.

Community feedback

Please log in to post a comment

Log in with GitHub
Discord logo

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