Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Your session has expired please log in again.
Your session has expired please log in again.
Your session has expired please log in again.
Your session has expired please log in again.
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Profile page with BEM naming convention

Vittorio De Luciaโ€ข 220

@VittorioDL

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


I appreciate any suggestion to improve my code! Feel free to tell me what I could have done better. Making the background with the svg's was the hardest part. I created 4 media queries to get as close as possible to the design, but i feel i could have done it in an easier way. The BEM conventions weren't as useful as i thought they would be, in fact i ended up creating many redundant rules.

Community feedback

Lucas ๐Ÿ‘พโ€ข 104,420

@correlucas

Posted

๐Ÿ‘พCiao Vittorio, congratulations for your solution!

I've inspected the code of your solution and I note that you've used BEM, congrats for that, you've done a good structure, to be sincere I don't like BEM because the classes are really long, but I cannot deny that's useful, so you did good by starting to use this css naming convetion.

About your code I've some tips for you:

  • You card component is responsive and this good, but note that the profile image isn't resizing as the other contents and the card stats start to behave strange when the window gets under width: 300px; one way to fix that is using flex-wrap: wrap; or that you create a media query to change this section direction. Here's the fix:
.card__content__stats {
    /* display: flex; */
    flex-wrap: wrap;
    margin-top: 2rem;
    border-top: 1px solid rgb(232, 232, 232);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem 2rem 3rem;
}

@media (max-width: 280px) { .card__content__stats {flex-direction: column;}}

Hope it helps you and happy coding!

Marked as helpful

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