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

3-column preview card component

#accessibility

@NatnaelSisay

Desktop design screenshot for the 3-column preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


While making the hover effect for the button i noticed the height of the container increase and reset when the button leave, Is there a way to avoid it?

I have seen if i could set the border before hand, having similar color as the background and then, only change the border-color on the active state it seem to have a better effect, but am still curious to see other options

Community feedback

@LuisJimenez19

Posted

Hello, congratulations on finishing the challenge.

So that it does not affect the height of the container, you could change the border to outline so that you do not affect the box-model of the element and make it bigger.

example:

.btn:is(:hover, :focus) {
	background-color: inherit;
	outline: 1px solid var(--clr-neutral-1);
	color: white;
}

That means my contribution is of some use, see you later 👋🏽

Marked as helpful

1

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