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

Order-Summary-Component

Amanβ€’ 590

@AmanGupta1703

Desktop design screenshot for the Order summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


.container::before { content: ""; background: url("/images/pattern-background-desktop.svg") center center/contain; position: absolute; width: 100%; height: 26rem; top: 0; left: 0; z-index: -1; } I am able to see the output of the above code in the visual studio live server, but I can't see it in the GitHub live page.

I would like to hear your feedback! 😊

Community feedback

Lucas πŸ‘Ύβ€’ 104,580

@correlucas

Posted

πŸ‘ΎHello Aman, congratulations for your new solution!

Your solution is really good and there's nothing to say about the code, nice that you've used BEM. The value you’ve used for the shadow make it too much dark and strong, to create a smooth shadow you need to give it less opacity and more blur instead try value for example and see the difference between the previous shadow and this one box-shadow: 5px 5px 12px 5px rgb(0 0 0 / 5%);

If you’re not familiar to box-shadow you can use this site to create the shadow design and then just drop the code into the CSS: https://html-css-js.com/css/generator/box-shadow/

πŸ‘‹ I hope this helps you and happy coding!

Marked as helpful

1

Amanβ€’ 590

@AmanGupta1703

Posted

@correlucas Thank you! 😊

1
Lucas πŸ‘Ύβ€’ 104,580

@correlucas

Posted

@AmanGupta1703 you're welcome Aman, feel free to ask me further questions πŸ™‚

Marked as helpful

1
Erayβ€’ 1,410

@ErayBarslan

Posted

Hey there, nice work with your solution! Some suggestions:

  • Regarding html structure, you have 3 nested <div> containers which you can achieve the same result by just using one. You can simply remove .summary-box without effecting the design. Removing .container will require little refactoring but you can remove anything related to that.
  • Using background on container breaks it's design on screen change. Using on body would be better option. After removing these elements from html you can use:
body {
  ...
  background: url("/images/pattern-background-desktop.svg");
  background-repeat: repeat-x;
}

.summary-item {
  ...
  width: 90%;
  max-width: 414px;
}

As you can see, just adding max-width is enough to achieve the same thing. You can also lower the need of media-query by adjusting % values for the mobile version, then give it a max-width. This approach is also preventing content overflowing between 375-550px due to width: 48%.

  • Lastly, now we have just .summary-item as container, you can use <main> on it instead div to be semantically right. Aside these good work again and happy coding :)

Marked as helpful

1

Amanβ€’ 590

@AmanGupta1703

Posted

@ErayBarslan Thank you! 😊

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