Design comparison
SolutionDesign
Community feedback
- @fabledankitPosted over 1 year ago
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 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