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-Card-Component | HTML | CSS | Flexbox | Mobile-First

Tomomiā€¢ 20

@Tomomi-K1

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


When setting up mobile version and desktop version, I set width to exact measurement that matches with the design with. How did everyone do?

Community feedback

Nayan Bhattā€¢ 980

@freaky4wrld

Posted

Hey there, I guess there's a need to make your solution more close to the design specifications....

  • you don't have to make your body element flex, instead make your main element a flex, so that your cards go side-by-side
  • then on reaching the mobile-version width, set the flex-direction to column, so that they become as they are now....

I would recommend you to have a good look on flex and mobile-responsiveness

Do have a look on this playlist----> Brad Traversy it contains everything you need right now

Hope it helps...... glad to help :)

0

Tomomiā€¢ 20

@Tomomi-K1

Posted

Hi @freaky4wrld

Thank you for the suggestions!šŸ™ŒšŸ»

I don't think I understood this assignment correctly. My design does not gradually change but it changes layout when it gets to over 1440px(desktop size according to figma file) since I made it mobile first.

I put flex on body to center the cards in the middle of screen. Is it a bad practice? How would you usually do?

Thank you again for your comment!

0
Nayan Bhattā€¢ 980

@freaky4wrld

Posted

@Tomomi-K1

To center the cards you can use the below code.....

main{
   width: [some-value]%;
   margin: [some-value]rem/em auto;
}
  • first I gave the main content a width in percentages.....
  • then a top and bottom margin in rem/em units
  • and made the browser to select the left and right margin

This will do the work...... hope it resolves your query

0
Tomomiā€¢ 20

@Tomomi-K1

Posted

Hi @freaky4wrld,

Thank you for replying to my question!šŸ˜Š I learned the another way to do it!

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