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 web design using flexbox

joacomenda 170

@joacomenda

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

I'm most proud of the analysis before making the website, this made the transition to bigger displays much more easy.

What challenges did you encounter, and how did you overcome them?

I found difficult to assign the relative units to the different parts of the webpage.

What specific areas of your project would you like help with?

How to center vertically the container of my whole design, so it looks good in all the displays.

Community feedback

Bryan Li 3,550

@Zy8712

Posted

Hi there! Your site looks pretty good.

To answer your question, one of the most basic ways of centering the card for this page would be to just use flexbox for your <body> tag. It could look something like this:

body{
   width: 100vw;
   min-height: 100vh;
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   overflow: hidden;
}

The attribution may interfere with your centering so you could just use this to get it out of the way:

position: absolute;
bottom: 0px;

Hope you find this feedback useful 👍

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