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 Component

@ernesto-ca

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


Is there an exact way to calculate the photo alignment inside of flex layout div?

Community feedback

Szymon Rojek 4,540

@SzymonRojek

Posted

Hi Ernesto,

Welcome here - first project done! :D

According to your question: I think the key is display flex with align-items: center, justify-content: center and then playing around with the margin-top.

I've just checked your HTML structure. A few tips from me:

  • I'd recommend learning about semantic tags (why they matter). Divs are semantically inert elements — elements that don’t really do or say anything;
  • the h1 is an HTML tag that indicates a heading on a website and normally used once on the page => Using more than one h1 will not result in an error, but using only one is seen as a best practice. It makes logical sense => h1 is the most important heading, and tells you what the purpose of the overall page is.
  • inside of the alt text you can simply type just the name without photo, because the tag img indicates that this is a picture;
  • you don't have to use the tag br here;
  • transfer footer to the bottom and make it more readable;
  • the circles are a bit tricky in this challenge: I have used pseudo-elements, position absolute, vw and vh, background url, transform translate and @media (in your solution they are not very stable on different devices);
  • I don't think that we have to do RWD in this challenge but maybe you would like to you make it better on mobiles devices;
  • please check your accessibility and HTML issues above.

That's it from me. Ps. Don't forget to upvote any comments on here that you find helpful.

Greetings :D

3

@ernesto-ca

Posted

wow amazing! thank you!

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