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 Order Summary Card

@cwaniraj149

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


The background image provided for the desktop version was for the 1440px screen, so I removed the background image for bigger screens. If you have any other solution for this problem, please comment and help me improve my site. I love to hear your feedback. Do comment 😊.

Community feedback

James 340

@James-alderson

Posted

Hi Shivani Raj, when I first started to solve this website challenges, I faced a problem because the resolution of the mobile design projects was from 375 to 1440, so I was quite frustrated. Finally, after seeing the challenges solved by other users of this website, I realized that no one designs with the size mentioned in the challenge files, everyone has already defined sizes for their designs and used them for their projects.

I use sizes (500 or 600) in my projects. That is, the size of the mobile design is from 500 or 600 and below. (Maybe later I will change the size from 500 to 600)

Because I design mobile first, I first defined the background image of the body tag in the mobile design, then in the desktop design I only changed the source of the background image.

///////// Some solutions to improve the project you have designed:

  1. Define the background image as I explained above (i.e. in both mobile and desktop sizes).
  2. Use max-width attribute instead of width. (After changing the width to max width, you'll be surprised, because you don't need to redefine the width for each size so that the page does not scroll horizontally).
  3. Give your img tag this style (display: block;) to take the full height of its parent element.
  4. You don't need to use multiple sizes to style your project, it's better to use two sizes to style your project. (that is, one size for mobile and one size for desktop).
  5. Change the links defined with the <p> tag to the anchor tag (<a> tag). this elements (change - cancel-order). (if you want the page not to refresh after clicking on the <a> tag, set the value (javascript:void(0)) inside the href attribute put it).
  6. The box2 element does not need display: flex; does not have.
  7. It is better to place the repetition of the <body> tag background image in the X-axis, because in high resolutions it causes the image to be repeated in the X-axis and take up the entire page.
  8. This element is not needed (button-container), it is better to remove it so that the number of your HTML codes does not increase.
  9. Set the margin value of the body tag to 0 so that your project is full screen and does not scroll on the vertical axis.
  10. IMPORTANT Always put the style (box-sizing: border-box;) inside your CSS code. More information: https://www.w3schools.com/css/css3_box-sizing.asp
  11. open the README-template file that comes with the challenge files and then change the information inside it and then put it in your project files with the name README. 12.Is better to use custom css property.

** I have made a fork in your repository, you can see the changes there.

Don't worry about the many solutions, you will learn them over time.

Continue to learning 💪 And happy coding 🚀

0
faizan 2,420

@afaiz-space

Posted

Hey @cwaniraj149, replace height:100vh; with min-height:100vh; of body element also add width: 100vh; in hero-image class. and replace width:350px with width:100% of button element;

0

@cwaniraj149

Posted

@afaiz-space sure. Thank you for reviewing my solution.

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