Design comparison
Solution retrospective
My parent Containers width anytime i hover on the button, i don't know why.
Community feedback
- @ElenaUJPosted about 2 years ago
Hi! Great work!
I just completed this challenge a few days ago (I'm a beginner, too :) ), and your solution came up in my feed. To fix the issue with the changing of container size, try to add the border to the button design (if it's the same color as the button background it will be invisible). Then, upon hover, only change background and font colors. Like this, the button doesn't change size, and the parent container shouldn't either.
Let me know if that works!
Elena
Marked as helpful0 - @MelvinAguilarPosted about 2 years ago
Hi @modade97 ๐, good job completing this challenge, and welcome to the Frontend Mentor Community! ๐
I have some suggestions you might consider to improve your code:
- The
<h1>
element is the main heading on a web page. There should only be one<h1>
tag per page. The HTML Section Heading elements (Reference). This case requires thatSUVS
,SEDANS
, andLUXURY
be<h2>
elements.
- Car icons are for decoration purposes only, so they can be hidden from screen-readers by adding
aria-hidden="true"
and leaving its alt attribute empty:
<img src="./images/icon-sedans.svg" alt aria-hidden="true"> <img src="./images/icon-suvs.svg" alt aria-hidden="true" > <img src="./images/icon-luxury.svg" alt aria-hidden="true" >
- Your component grows because you add 2px of a border to a button that previously had no border
Above all, the project is done well๐. I hope those tips will help you! ๐
Good job, and happy coding! ๐
Marked as helpful0 - The
- @modieeePosted about 2 years ago
@MelvinAguilar and @ElenaUJ, thank for your hint on the boder 2px i added to the hover, i have edited it and it works, and @MelvinAguilar thank you for your tip on arial-hidden="true" it came in handy on another challenge i did as well: https://modade97.github.io/four-card-feature-section.
0
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