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 using HTML and CSS

Greeshma 10

@greeshmaym

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


Hi, This is my first challenge on Forntend Mentor.I think Design is OK but it doesnt scale accordingly to browser size.Any leads would be helpful.

Community feedback

Anis 135

@anisgo

Posted

hello, change the h2 tag to h1 and add font-family: "Big Shoulders Display". and font-family: "Lexend Deca" in p tag

Marked as helpful

0
Mike Hayden 1,005

@mickyginger

Posted

Hi Greeshma! 👋

First of all, this looks great, so well done! 🎉

You're always going to have difficulties when using absolute positioning for layout, so I would strongly advise against it. Absolute positioning is good when you want to position something over the top of something else, and in relation to it. If you look at the notification bell icon on Frontend Mentor, you'll see that there's a red notch that appears indicating how many unread notifications you have. That's absolutely positioned, but mostly we use flexbox or grid to position our elements on the page.

You can position your order summary component by with flexbox like so:

body {
  margin: 0;
}

.main-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

Then remove position: absolute and left: 36% from .sub-block.

Here's a great guide to flexbox by CSS-Tricks.

Hope that helps! 😀

Marked as helpful

0

Greeshma 10

@greeshmaym

Posted

@mickyginger The link you have provided is very helpful, I will definetly improvise the code.Thank you so much for taking time and giving me a feedback.

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