@tesla-ambassador
Posted
Hello Rose Mutai! This is a pretty good solution. I also enjoyed completing it... It was fun and challenging. I took a look at your code to find out why your calculator wasn't centered and I added a few styles to the css in my browser to see what would fix it. I recommend you add this to your body tag:
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
}
I found out that if you want to vertically align something using flex, you need to give it's container a height property. Also, I don't think I implemented this on my solution but It'd be great if your form submission and validation function fires after all fields have been filled in so that people that have no keyboards can find it easier to use.
Have fun programming and I hope you find this helpful. π
Marked as helpful