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 three columns cards

Danielβ€’ 280

@ddaniel27

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 really need help with widths. I put an early @media query to avoid weird behavior, so, how do you do it in general?

Community feedback

Michael Bishopβ€’ 1,070

@MikeBish13

Posted

I think your issue here stems from coding the challenge out desktop first, which makes things a little more difficult as the screen size reduces. Coding your projects mobile first is a good habit to get into.

In terms of the issue itself, I think the flex-wrap is causing the problem alongside a lack of flex-direction. I would remove the flex-wrap and set the flex-direction to 'column' on your (max-width:800px) media query - this should remove the need for setting widths on each of your sections.

0

Danielβ€’ 280

@ddaniel27

Posted

@MikeBish13 Thanks! I've read about that but I didn't think was so useful. I'll keep it in mind :)

0
Roc Tanweerβ€’ 2,500

@RocTanweer

Posted

Great πŸ‘Œ work ☺️ @Daniel

I am on mobile so I can't inspect your project but I am giving some suggestions 😊

  • when the button is hovered then you are giving it a border which is moving elements around it which is not good for UX, so you may do this
.btn {
    border : 2px solid blue;
};
.btn : hover {
    border-color : #ffffff;
}

This way you are already giving it a border of same color as background but when hovered, the color of border gets white or as per the design and not actually creating a border

  • Use Irfan view to measure the layout from the design image they provide

Hope it helps and happy coding πŸ˜‰

0

Danielβ€’ 280

@ddaniel27

Posted

@RocTanweer Big thanks for reply! I had not thought of that, it's a cool trick hahaha, thanks again.

1
Roc Tanweerβ€’ 2,500

@RocTanweer

Posted

@ddaniel27 my pleasure 😊

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