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 Stat Preview Card

@Moses4data

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I will need some assistant with the mobile design.

Community feedback

P
Jeuri Morel 1,405

@JeuriMorel

Posted

Hey Moses,

Try adding display: block; to your image tags to remove the little bit of space under them. On the mobile version of your solution the overlay creates a small border under the image because of this extra space.

I see that you are using the desktop version of the image even on mobile. You have display: none; on the mobile image, but never use it.

Marked as helpful

0

@Moses4data

Posted

Thank you @JeuriMorel I tried using the mobile-img but it wasn't displaying. I would be glad if I can get clarity as to how to make it work. Thanks

0

P
Jeuri Morel 1,405

@JeuriMorel

Posted

@Moses4data

I always use the HTML <picture> element in these situations. It will switch between images automatically based on the screen size.

Read more here

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