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

Anna P. M.โ€ข 390

@annapmarin

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 don't think it's my best project. I haven't found a better way to put the background images, and I haven't managed to make them responsive at all. What would be a more efficient way to do it?

Community feedback

@MelvinAguilar

Posted

Hello there ๐Ÿ‘‹. Good job on completing the challenge !

You could use the CSS backgrounds properties to set the background:

body {
    . . .
    min-height: 100vh;
    background-color: var(--cyan);
    background-image: url(./images/bg-pattern-top.svg), url(./images/bg-pattern-bottom.svg);
    background-repeat: no-repeat, no-repeat;
    background-position: right 52vw bottom 35vh, left 48vw top 52vh;
}
  • background-color: Change the color of the background.
  • background-image: Set a background image.
  • background-repeat: Determines whether or not a background image will be repeated along the horizontal and vertical axes.
  • background-position: This property specifies the starting position of a background image. More information.
  • background-size can also be used to specify the size of the background image.

The background property is shorthand for all the properties mentioned above but for now. It is better to understand them separately.

The background-position for me worked with the vw (viewport width) and vh (viewport height) units, but you can also use percentages. It's just a matter of trial and error to place them as you wish.

References:

  1. CSS background Property |
  2. Background property
  3. Background-repeat (MDN)

I hope you find it useful! ๐Ÿ˜„

Happy coding!

Marked as helpful

1

Anna P. M.โ€ข 390

@annapmarin

Posted

@MelvinAguilar Thank you very much!!

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