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

Stats preview card component challenge hub

MANVANTH 40

@MANVANTH04

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


If I have done any mistake let me know (:

Community feedback

darryncodes 6,430

@darryncodes

Posted

Hi Manvanth,

Well done, a very close match on desktop!

At a glance here is some amendments you could try. I'd really encourage you to research responsive design:

  • add a media query on .container and add flex-direction: column; at a mobile breakpoint to make your design responsive. Then add order: 2; to .text-area to move the text below the image
  • this is an invaluable resource A Complete Guide to Flexbox
  • remove background-color: hsl(233, 47%, 7%); and height: 100vh; from .background your body could be the background instead of the extra <div>
  • add the following to your body to centre your design nicely in the viewport with the above steps
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: hsl(233, 47%, 7%);

Marked as helpful

1

MANVANTH 40

@MANVANTH04

Posted

Thank you darry @darryncodes

0
P
Fluffy Kas 7,735

@FluffyKas

Posted

Hey, you could try centering your component with flexbox/grid. Your solution is also missing a mobile view. The section you named background is also unnecessary, you could apply background styles on your body easily ^^

Marked as helpful

1

MANVANTH 40

@MANVANTH04

Posted

Thank you fluffy (: @FluffyKas

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