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

Responsive mobile first solution for Profile Card Component challenge

@ikornzaft

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


Those backgrounds keeps giving me headaches! Can't figure out how to position them correctly.

Community feedback

Arturo Simonβ€’ 1,785

@artimys

Posted

Hi Ignacio. You're not alone on the background images. The key I think is to setting the size first then position.

So add both images as a background-image to your body. I recommend getting the background-size first using px units then to positioning. For the position % really makes it scale like crazy. Instead try first px, em or rem units.

For the desktop keep using your media query to adjust size and then position.

more info here on multiple background images

body {
  background-image: url(./images/bg-pattern-top.svg), 
                    url(./images/bg-pattern-bottom.svg);
  background-repeat: no-repeat;

  // Numbers are random but should be a good template
  background-size: 500px, 500px;                      
  background-position: top -200px left -100px, 
                       bottom -100px right -100px;
}

Overall your profile design looks great.

Keep on coding!! πŸ‘πŸ‘

2

@ikornzaft

Posted

I really appreciate your feedback. I couldn't figure out how to use two background images at once, so your comment is really useful! Thanks!

1
T
ApplePieGiraffeβ€’ 30,545

@ApplePieGiraffe

Posted

Hey, Ignacio Kornzaft! πŸ‘‹

Nice work on this challenge! πŸ‘

Just an additional tiny tip about positioning the background SVGs if you're interestedβ€”you can actually use vw and vh units in the background-position property to keep the SVGs in their place so that they do not move around when the page is resized. πŸ˜‰

Keep coding (and happy coding, too)! 😁

1

@ikornzaft

Posted

Thanks for the tip! I'll try this on my next challenge.

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