@danielmrz-dev
Posted
Hello @Y-ashbhatt!
Your solution looks excellent!
I have just one suggestion:
📌 Avoid setting fixed width
values for elements like this. You've set width: 23%
for the card and this is making it shrink as you reduce the window width. Instead, you can set a max-width
to it.
And about height, you don't need to set height to the card, because it adapts automatically as you add content to it.
Here's your code with the suggestions:
.box {
/* width: 23%; remove this line ❌ */
/* height: 72%; remove this line ❌ */
/* max-width: 350px; add this line ✅ */
border-radius: 20px;
background-color: var(--White);
text-align: center;
box-shadow: 0 15px 15px rgba(0, 0, 0, 0.1);
padding: 15px;
}
I hope it helps!
Marked as helpful