Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

Profile card component using Flexbox

Adrian H•420
@AdrianX19
A solution to the Profile card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


My fifth challenge here and even though at first glance it looks like an easy one two things got me thinking :)

  1. I had trouble how to deal with the pattern card image, it doesn't feel like it has any relation to the content and therefore it doesn't feel like it should be an <img> element - I set it as a background image but that made me to set the fixed value for the avatar position which obviously is not very elegant and might cause some issues - any ideas how to handle it in an elegant way?
  2. I've recently started learning BEM naming convention and during this project it got me thinking - how should I name nested elements with two parents or more? for example in my project I have such structure card > card__personal-details - how should I call class for the element inside the card__personal-details ? card__name or rather personal-details__name?

Would really appreciate any feedback!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Adrian H's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License