Not Found
Not Found
Not Found
Not Found
Not Found
Your session has expired please log in again.
Your session has expired please log in again.
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 landing page using CSS (flexbox and grid).

AlexaVas 20

@AlexaVas

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Mahdi Ali 180

@mahdicodes1

Posted

Hello AlexaVas, How are you?

I have a tiny tip for your CSS codes. You don't need to rewrite the codes that don't change in the media query section. For example: For the body tag that:

body {
background-color: hsl(30, 38%, 92%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 800px;
}

I have commented on the codes that don't need to rewrite them:

@media screen and (max-width: 600px) {
body {
/*  You don't need these lines of code. */
/* background-color: hsl(30, 38%, 92%);
display: flex;
align-items: center;
justify-content: center; */

height: 700px;
width: 100%;
margin: 0px;
}

By eliminating these codes, the size of the CSS file will reduce, the page's performance will improve, and maintaining style codes will be easier. I hope you find it useful!

Marked as helpful

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