Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Profile card using CSS Flexbox

@yornellas

Desktop design screenshot for the Profile card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Don't know if I've done it the bet way... my first try doing this.

Community feedback

P
Matt Studdert 13,611

@mattstuddert

Posted

Congrats on submitting your first solution, Yolanda! I hope you enjoyed the challenge and learned a lot while working through it!

Your project is a sound reproduction of the design. I'd recommend having a go at trying to make the circles in the background stay in place all the way down to mobile, like in the designs.

Here are a few areas I'd recommend reviewing:

  • You've got multiple IDs with the same value. This is invalid HTML, so is not best practice. Instead, it's best to use classes if you want to group elements for styling.
  • Talking about styling. Avoid using IDs as CSS selectors. They have high specificity and can't be reused on the page, so they're not suitable for styling. Instead, I'd recommend sticking to class, attribute, pseudo, and type selectors. Using these will help keep your CSS more maintainable.
  • You've got an alt attribute of alt="photo" for the profile picture. The value inside the alt attribute should be a description of the image. If the image adds no extra context to the content, it should be skipped by screen readers. You can do this by leaving the value blank like this alt="". As this is a profile picture, it doesn't add any context to the content, as the person's name and age are directly below it in the HTML. Therefore, I'd recommend leaving it blank.
  • You're not using any headings elements at the moment. Headings are important for creating a proper content hierarchy. This is especially helpful for screen reader users, as screen readers will use headings to structure the content. I'd recommend adding headings to add this hierarchy.
  • I'd recommend getting into the habit of using more descriptive class names than .item1 and .item2. Descriptive class names are great because they can help document your HTML code. For example, .item1 could be called .profile-info, and .item2 could be .profile-stats. These are more descriptive of the areas they are being used to represent.

I hope you find these tips useful. Let me know if you have any questions and keep up the great work! 🙂

0

@yornellas

Posted

Hello, @mattstuddert Thank you so much for your feedback! I'll make sure to consider them next time I work on a project.

0
P
Matt Studdert 13,611

@mattstuddert

Posted

@yornellas you're welcome!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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