Design comparison
Solution retrospective
Proud: The time that I spent to do that
What challenges did you encounter, and how did you overcome them?Challenges: How to resize paragraph background color
What specific areas of your project would you like help with?N/A
Community feedback
- @Islandstone89Posted 6 months ago
HTML:
-
"HTML & CSS" should be a
<h2>
. -
I would replace the
id
withclass
. -
The profile image needs a more descriptive alt text, for example "Headshot of Gary Hooper".
CSS:
-
Including a CSS Reset at the top is good practice.
-
I like to add
1rem
ofpadding
on thebody
, to ensure the card doesn't touch the edges on small screens. -
On the
body
, changeheight
tomin-height
- this way, the content will not get cut off if it grows beneath the viewport. -
Remove the
width
andheight
on the card. You should rarely set fixed sizes inpx
, as this prevents components from adapting to different screens. -
Add a
max-width
of around20rem
on the card, to prevent it from getting too wide on larger screens. -
I would use
rem
instead ofem
forfont-size
. -
line-height
should not be inpx
. Instead, use a number relative to the element's font size. For example, if the element has a font size of 16px, and you wanted a line height of 24px, then you would do24 / 16
, which is1.5
.
0 -
- @cvtqxPosted 6 months ago
Great job implementing this design! I love how you did the hover states on interactive elements with pointer cursor and transitions.
One area of improvement I would suggest is to work on your class names. Its important to give descriptive and easy to understand names so that other developers working on your code in the future can read your code without problem. Here is a great article that can help: https://www.freecodecamp.org/news/css-naming-conventions-that-will-save-you-hours-of-debugging-35cea737d849/
0
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