Design comparison
Solution retrospective
I have completed my first design draft for this challenge. I am unsure of the challenge part where it states users are able to focus states for all interactive elements on page. I didn't make any active states. I probably need to read through the challenge again though. I would like to know what is best practice when making the sizes for these designs. Such as width and height when it comes to the actual card itself. Thank you for all the feedback.
Community feedback
- @danielmrz-devPosted 10 months ago
Hello @cloudpc7!
You did a very good job there!
I have just a very simple suggestion for improvement:
- Since the title is a clickable element, it's nice to add
cursor: pointer
to it in addition to the color shift when hovered over.
I hope it helps!
Other than that, you did a great job!
0 - Since the title is a clickable element, it's nice to add
- @BlackpachamamePosted 10 months ago
It is great! 😁
Regarding your questions about
width
andheight
:- It is better to use
max-width
andmin-height
instead, these will be reduced or extended respectively, if necessary. On the other hand, withwidth
andheight
they will always maintain the same size. Taking your example code, I made some changes and I think it looks better this way, at least it doesn't look so big:
.container { display: flex; flex-direction: column; background-color: #ffffff; max-width: 22.75em; min-height: 33.75em; border: 1px solid #000000; border-radius: 1em; box-shadow: 12px 12px #000000; padding: 1.75em; margin-bottom: 1.25em; }
- In your
img
also do not usewidth
, instead usemax-width: 100%
, this will make the image fit the container and not overflow - In the avatar's
img
, applyingheight: 100%
doesn't change much. In that case, if you can define a fixedwidth
because the image will always maintain the same size, also add aheight: auto
so that it maintains its aspect ratio:
.illustrator { width: 45px; height: auto; }
- Instead of adding a
margin-right
to theimg
, you can apply thegap
property to yourauthor
class, this generates the space you need:
.author { display: flex; align-items: center; margin-top: 1em; gap: 1em; }
0 - It is better to use
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