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 preview

@garang-deng

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 know this is a mess but with your help, I can be able to code it well next time 😘

Could someone please explain to me how to use .svg images as background-images and the easy way to center the profile image, thanks

Community feedback

Lucas 👾 104,420

@correlucas

Posted

Hello Garang,

You can import the svg image as a background using the inside the body or inside a class using the property background-image: url(insert here the folder location).

Marked as helpful

1

@garang-deng

Posted

@correlucas thanks for the feedback. This is very helpful Lucas but how can I make it (them, top and bottom images) appear as the original? You can see I've left it out in my project 🙈🙈🙈

1
Lucas 👾 104,420

@correlucas

Posted

@Garang-Deng The only way to have the exact match is having the Figma/Sketch files given from the premium subscription. But you can try to adjust using the reference jpeg image from the starter files to reach a result as close as possible.

Here's one example: body { background-image: url(./images/bg-pattern-top.svg), url(./images/bg-pattern-bottom.svg); background-position: top -500px left -350px, bottom -500px right -350px;** background-size: cover; background-repeat: no-repeat;}

Note that inside the background-image property you can insert the circle image that goes to the top and bottom and all the following properties will change them. Use background-position to adjust the position of each circles considering the image sequence.

See if works for you bro and feel free to ask me further questions.

Marked as helpful

1

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