Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

Order summary component HUB

Angelo Barbarulo•280
@Jorahhh
A solution to the Order summary component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hi there! I'm Angelo a this is my first work ever. Just one month has passed since I've start learning HTML/CSS by myself, so I'm super open to every good/bad feedback.

P.S. I'm from Italy, then I'm so so sorry for my bad English.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • dinahbrito•120
    @dinahbrito
    Posted over 3 years ago

    3, ah sorry, didn't realize it was a button. And yes, that's what I meant by flex box. Maybe give it another try? It makes things a lot easier when you figure it out

    Marked as helpful
  • Raymart Pamplona•16,040
    @pikapikamart
    Posted over 3 years ago

    Hey, awesome work on this one and congrats on your first challenge here at FEM! Hope that you found this exciting to do learn from it. The overall layout looks great I think, the only issue visually is the wave-image not showing and if you go to like 440px below, the layout doesn't respond to the screen-size anymore, creating a horizontal scroll.

    dinahbrito already gave really great feedback on this one, just going to add some suggestions as well and don't mind me re-iterating some dinahbrito's points again:

    • It would be great to have a base styling of this:
    html {
      box-sizing: border-box;
      font-size: 100%;
    }
    
    body {
     margin: 0;
    }
    
    *,
    *::before,
    *::after {
      box-sizing: inherit
    }
    

    This way, handling an element specially its size will be easier because of the box-sizing

    • Don't use position: absolute a very large element. If you inspect your layout, hover on either html or body tag, you will notice that it has no height since its element is being absolute. Since you are just using this to center the layout, it would be much better to do it this way. But first, remove these stylings on the .container:
    position
    top
    left
    transform
    

    Then on the body tag, add these stylings:

    align-items: center;
    display: flex;
    justify-content: center;
    margin: 0 auto;
    min-height: 100vh;
    

    If some of these stylings are new to you, have a search about flexbox^^

    • Also, see that I added the margin: 0 on the body tag? This is because you set a max-width on the body tag. If I haven't added that property, the body won't be centered for large-screen-users.
    • Always have a main element to wrap the main content of the site. For this use main tag on the .container selector.
    • For the vector/illustration on the card, the image is only acting as decorative on this one. Decorative images should be hidden for screen-reader at all times by using alt="" and aria-hidden="true" to the img tag or only aria-hidden="true" if you are using svg instead of img tag.
    • Only use descriptive alt on images that are meaningful and adds content to the site otherwise hide the image for screen-reader users.
    • Also, when using img tag, you don't need to add words that relates to "graphic" such as "image" and others, since img is already an image so no need to describe it as one.
    • Same for the music-icon, it is only acting as a decorative image and avoid the "icon" word as well.
    • A typo, it should be plan and not plane:>.
    • Also on the annual plan text, you should be using an h2. When using a heading tag, make sure you are not skipping a level. If you use h4 then make sure that h1, h2, h3 are all present.
    • Lastly, to avoid the layout creating a horizontal scroll at the size I mentioned from the start, add a width: 100% on the img on the top part of the card so that it will scale along its container.

    Aside from those, great job again on this one. Let me know if you have any queries.

    Marked as helpful
  • dinahbrito•120
    @dinahbrito
    Posted over 3 years ago

    This looks great for your first time! The design is pretty close.

    Some feedback:

    • The background image isn’t visible for mobile or desktop. Since your project is already inside of the folder “order-summary-component-main” you don’t need to include that in the url path. Here are some tips that might help: https://css-tricks.com/quick-reminder-about-file-paths/

    • HTML headings have to be in number order. So after an H1 tag, there should be an H2 tag instead of an H4. Then you can style the H2 to be whatever size you want.

    • The button tag should be used only for buttons, so the "change" link and the "cancel order" link should be made with an anchor tag instead. It’ll be less code as you don’t have to remove the button styling.

    • In the future look into “flex box” and “grid”, it will really help with making the mobile version of the design responsive.

    Great job!

    Marked as helpful
  • Angelo Barbarulo•280
    @Jorahhh
    Posted over 3 years ago

    I've just found out that I forgot to change the folder for the background images from the body. Argh!

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub