Column preview using grid and flex
Design comparison
Solution retrospective
I've had a problem with the hover effect on the button, every time i hover over it, my container height increases because it adds some pixels of the button border, anyone knows a simple solution to avoid this ?
Community feedback
- @al-ameen36Posted about 2 years ago
Hello Alexsandro
You are having this issue because the normal button state does not have a border, while the hover state has one. You can fix it by changing the border property on the button from this
.grid-item2 button { ... border: none; ... }
to this
.grid-item2 button { ... border: 2px solid white; ... }
Hope this helps :)
Marked as helpful0 - @art5551Posted about 2 years ago
Believe it's just the border you are adding on hover. remove the border?
Marked as helpful0 - @VCaramesPosted about 2 years ago
Hey @AlexAgustini, some suggestions to improve you code:
-
The headings are being use incorrectly. For this challenge, each heading is equally as important. So best option, is to use <h2> Heading, because it will give each card the same level of importance and it's reusable.
-
Your "buttons" were created with the incorrect element. When the user clicks on the button they should directed to a different part of you site. The Anchor Tag will achieve this.
Happy Coding! 👻🎃
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