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 using HTML and CSS/Flexbox

Tyler 50

@tylerthietje

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


Trying to get this centered on the page was tricky for me. Does anyone have a better way to do it than I did?

Community feedback

Rayane 1,935

@RayaneBengaoui

Posted

Hello Tyler,

Congrats for completing another challenge ! 🙂

In addition to the great feedback of @tediko, I would suggest to add more padding to your buttons to match better the design and font-family: inherit to override the default font.

Also, I would change the break point on the media query as the content overflow the screen between 500px and 1100px.

Overall, well done for the challenge and happy coding ! 😃

Have a nice day 🌞

1

Tyler 50

@tylerthietje

Posted

@RayaneBengaoui - Thank you for your suggestions above! I made the changes and now my site looks much better! Thank you for taking the time to help me out!

0
P
tediko 6,580

@tediko

Posted

Hello, Tyler! 👋

Add another div and wrap your .cointainer into that. Then to that new div add these styles, it'll center your container:

display: flex;
justify-content: center;
align-items: center;
width: 100vw;
height: 100vh;

After that, you have to remove styles from .container and make this element to be flexible.

display: flex;
flex-direction: row;
max-width: 1110px;
width: 100%;
padding: 12px;

Remove width from .panel element. And also remove margin-right: 200px; from .pic element because it causes your element isn't scalable.

Now we have to work on media queries. Remove the currents one and add media query for 700px width for our new div and set align-items: unset;, then for .container for 700px width set:

display: flex;
flex-direction: column;
align-items: center;

and lastly add max-width: 360px; to your .panel.

Good luck with that, have fun coding! 💪

1

Tyler 50

@tylerthietje

Posted

@tediko

Sorry for the delayed reply! I was forced to be away from this site for a few days. I finally got back to this and applied the changes you recommended and they worked like a charm! My site looks just like I want it to now. Thank you for taking the time to help!

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