Design comparison
Solution retrospective
I will be grateful for any advice
Community feedback
- @ZglobiulViuPosted over 1 year ago
You should use box-shadow instead of border for the items hover state. When you set that border of 3px your page will grow in dimension when you hover over a specific item. Also I wouldn't use innerHtml to read numeric values from the html elements instead i would use variables to set for example an incrementor like this: let numOfProducts=0; then create a function to either increment or decrement based on the clicked sign and then display numOfProducts on the page or just let that in two separate functions like you did there.Also instead of using parseFloat() method use Number("num") to convert from string to num or shorter put a + sign in front of the string representation of a number like this : +exOfstringNumber;
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin 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