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

used html,css,JavaScript created static web page for tip calculation

#accessibility#jss

@Saravana16041999

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


while working on this project it was hard to align the ever thing in order for mobile view. and there are some mistakes in mobile view it might be good on 320px not on 425px . first time used onclick event in this project and used event listener "change" in custom option . custom is created using the input element. and claculation might be different i did based on my knowledge.

Community feedback

Adriano 33,990

@AdrianoEscarabote

Posted

Hi Saravana Kumar, how are you? Welcome to the front-end mentor community! I really liked the result of your project, but I have some tips that I think you will enjoy:

A good practice to center content is using grid or flex-box, avoid using margin or padding to make placements, use only in the latter case! we can do it like this:

Flex-box:

body {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min height: 100vh;
}

GRID

body {
    display: grid;
    min height: 100vh;
    place-content: center;
}

To improve the code structure wrap this div:

<div class="attribution">

with the semantic tag footer

The rest is great!

I hope it helps... 👍

Marked as helpful

1

@Saravana16041999

Posted

@AdrianoEscarabote thank you for helping me i will do my best to improve myself and fix the errors!

1
Divine Obeten 2,435

@Deevyn9

Posted

Hi Saravana, congrats on completing this project, your solution looks really great. Although I found the following issues:

  • The calculation for the Tip and Total amounts aren't accurate.
  • The Error messages don't clear out when the reset function is triggered.
  • The container isn't centered vertically, this can be fixed using body { display: grid; place-items: center; }
  • I also noticed that you didn't use the design for the mobile view and it makes it hard to use on small screens.

If you have issues trying to fix these issues, you can use my solution

I hope you find this helpful.

Happy Coding! 🎉

Marked as helpful

1

@Saravana16041999

Posted

@Deevyn9 I saw your code it was awesome i learnt lot and i will improve my disign and fix my errors thank you.

0
Divine Obeten 2,435

@Deevyn9

Posted

@Saravana16041999 glad i could help!

0

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