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

Responsive Profile Card Component using CSS Grid/Flex

Liam Tanfield•260
@TanDevv
A solution to the Profile card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This project was really fun, I loved the color schemes. :) I do have some questions on my code if anyone can give me advice on!

1: At first I was wondering how to implement the background pattern on the card, I was deciding between adding a div child in the container and then adding the pattern as a img or add it as a background-image. I went with the first option but I was curious if using just a div with a background-image would have been better practice than using an img tag, as the image was purely decorative?

2: For the avatar I went with a negative margin-top instead of using position: absolute, just so the space the avatar took went with it rather than moving just the image with position. Was using negative margin good practice for this situation? As I hardly use negatives in anything I was wondering if it is okay to use compared to position.

Overall feedback and/or suggestions of code changes would be greatly appreciated for me to take into my next projects. :)

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 Liam Tanfield'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
  • Use cases

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