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

Four Card Feature Section Using Grid

@adrianna-thomas

Desktop design screenshot for the Four card feature section coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


My solution matches the design at the 375px and 1440px viewpoints, but in between those screen sizes is it supposed to scale relative to the screen size?

Should I have done the mobile view first?

I tried to only use pixels for font size and border radius, should I have used pixels for the dimensions of the divs and containers?

Community feedback

Andy 520

@AndyAshley

Posted

Hey Adrianna, Good job on the challenge! I do see what you're talking about after the mobile breakpoint where it kind of squishes together until it gets wider. What you could do is give your main container a max-width until a mid way breakpoint where the content has enough room to do its 4 way layout. That way it doesn't stretch out too far while its waiting for enough room fully expand.

Also I noticed at your 400px breakpoint you put a . before your main selector making it look for a main class instead of the actual main tag. The centering gets thrown off above 1440px. That can be fixed by simply adding display: flex with a justify-content: center on the body.

I don't think it really matters what units you choose for your sizing of elements as long as they're consistent. percentages can act in weird ways sometimes so I would stick with something like px, rem, or ch (with text). em can change based on the parent containers text size.

Hope that helps! if you have any questions feel free to ask me here :) Good job and happy coding!

Marked as helpful

0

@adrianna-thomas

Posted

@AndyAshley Thanks for the feedback! It has been helpful. However, when I tried your suggestion of changing the max-width of the main container to a smaller value, it still appears squished before it fully expands. Do I have to adjust the sizing of the cards as well? Or do I add another media query?

I named a class as "main" but I went back and updated it to "main-section" to eliminate any confusion.

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