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

3 column preview card component

@sumaira10041

Desktop design screenshot for the 3-column preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I think i can't make it responsive........

Community feedback

@atmahana

Posted

Hey there. That is a good progress.

You are using flex which is a good start for a responsive layout. The reason of why the cards are not placed in the center because you kind of reset the flex state of the parent element with display: block on mobile screen.

@media(max-width:700px){
    .main{
      display:block;
    }
}

I believe you want to make the cards direction vertical instead of horizontal. You can achieve it by:

@media(max-width:700px){
    .main{
      flex-direction: column
    }
}

With flex-direction you can change the direction of the flex items in the flex container either to row or column. If you want to know more about flexbox, you can read it here. Kevin Powell also covered up this topic in his video

Marked as helpful

0

@sumaira10041

Posted

Thnx alot........@atmahana

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