@elaineleung
Posted
Hi Kenisa, well done on completing your first challenge on Frontend Mentor! I think you did an excellent job here with your solution. In terms of feedback:
First off, you got a box-sizing
rule as a reset, so good job! I would also add at least a rule underneath for images since you're using one in this challenge. That way, your images will mostly work fine when you add them in.
img,
picture,
video,
canvas,
svg {
display: block;
max-width: 100%;
}
I see that you got some fixed widths on your card and image, which can be easy to use when starting out, but with more complicated layouts, you'll almost always want to use either responsive widths (e.g., max-width
) or just let the contents or parent container determine the size, instead of needing to set one.
Here is something you can try:
If you added the rule I mentioned above regarding images, you can go ahead and remove all the widths, margins, and heights for the card and image (including the elements inside), and then set a max-width:300px
on .card
with padding: 1rem
. Next, add a new div container under .image
, and put both the h1
and p
inside this new div container; give the container a padding: 1.5rem 0rem 2rem
, and also a margin-bottom: 1rem
for h1
. With this, you only need one max-width, and you can just rely on the padding and contents to determine the height and width.
Anyway, you're really doing great, so keep working on these challenges, and happy coding!
Marked as helpful
@KenisaRenee
Posted
@elaineleung Wow, Elaine! Thanks so much for the awesome feedback and encouragement. I will implement your suggestions to the best of my ability!