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-read-description you might learn something

AbhiGhoghariβ€’ 270

@AbhiGhoghari

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


So, first, I was very bad at CSS. I knew what to apply, but after applying it, it became a mess. I felt like giving up and questioning myself why I was doing this. However, after digging and researching, I found some courses that really helped me. No, this is not some kind of promotion. I want to tell you that if you don't have money, don't worry. I will create a daily challenge and provide you with information that will be helpful to you in the future.

So, let's go with this one: I created this layout without using height and width unless it's really necessary, such as in the body to center the div. I avoid setting height because if you set height, you will lose responsiveness. Remember, HTML is responsive, and we are the ones who make it unresponsive.

Here are some tricks:

Always use padding to set the height and width of buttons or make them look like buttons. The ratio I use is 1:2 (height:width), depending on the button. Use "em" for setting padding and margin, and use "rem" for font size. This video link (https://youtu.be/_-aDOAMmDHI) explains why. I'm sure it will be really helpful to you. After watching this video, you will understand why "em" and "rem" are preferred. With this approach, we only need to make slight changes in the media queries. I hope this helps you. If you have any questions, feel free to ask me here. If you like it, then follow me, and I will post every day.

Community feedback

Abdul Khaliq πŸš€β€’ 72,660

@0xabdulkhaliq

Posted

Hello there πŸ‘‹. Congratulations on successfully completing the challenge! πŸŽ‰

  • I have other recommendations regarding your code that I believe will be of great interest to you.

BACKGROUND iMAGE πŸ“Έ:

  • Looks like the background svg has not been properly set yet, So let me share my css snippet which helps you to easily apply the background color with the background svg they provided to place perfectly as same as design.
  • Add the following style rule to your css, and then experience the changes
body {
background: url(./images/pattern-background-desktop.svg) no-repeat, #E1E9Ff;
background-size: contain;
}
  • Tip, Don't forget to generate a new screenshot after editing the css file

.

I hope you find this helpful πŸ˜„ Above all, the solution you submitted is great !

Happy coding!

0

AbhiGhoghariβ€’ 270

@AbhiGhoghari

Posted

@0xAbdulKhalid Thanks!!!

0
Abdul Khaliq πŸš€β€’ 72,660

@0xabdulkhaliq

Posted

@AbhiGhoghari Glad you found it 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