Ankit• 40
@fabledankit
Posted
When you are doing rounded corners inside a container with rounded corners, you want the border-radius of the inner component to be almost 1/2 of the border-radius of the container.
This is what i did, please let me know if there's something that I can do better. (https://frontend-mentor-challenges-mdbe-536imekjx-fabledankit.vercel.app/)
.card-component {
width: 250px;
/* margin: 10em auto; */
border-radius: 2em;
background: #fff;
padding: 1.6em;
box-shadow: 15px 9px 30px rgba(214, 226, 240, 0.25);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.card-component img {
width: 100%;
height: 100%;
border-radius: 1em;
}
Marked as helpful
0