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 Profile-Card-Component using CSS Grid

@M-Chan

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


Not exactly the most responsive... I had some issues with the mobile version. I used CSS grid for the layout and '@media only screen and (max-width: )' to create a new stylesheet for mobiles. However, even though I used viewport sizes and overflow hidden, there was still scrolling on the mobile and weird positions for the circles. Any suggestions are appreciated!

Community feedback

@snehamoybag

Posted

Hi Chan 🙋‍♂️ Great try attempting this challenge 👏 I too struggled positioning the background-circle images 😂 its no big deal though as a developer we learn new things when we get stuck 😁

So for your queries you don't actually have to place the images on your html. You can set multiple background images separating them with commas ,. Like this background-image: url(images/1st-img.svg) , url(images/2nd-img.svg);

Similarly to position the two images separately you can do something like this background-position: right 52vw bottom 35vh, left 49vw top 49vh ; As you can see, we used , to position the two different images seperately. 😃

To make the profile card responsive, You can set its default width to something like width: 90% and to make the card not get too wide add a calculated max-width, like max-width: 21rem

Here are few documents you can check to learn more about this:

And as a final note, You don't really have to create a separate css file for the mobile version . You can add as many media queries you want in a single css file. 👍

Feel free to reply if you need any further help 😄

Marked as helpful

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