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

Order summary using CSS Grid and flexbox

P
Jeronimo Palacios•300
@giropa832
A solution to the Order summary component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I have been unable to properly align the image icon, the plan info and the change link. I've tried using flexbox but not sure it is the right tool here.

Code
Couldn’t fetch repository

Please log in to post a comment

Log in with GitHub

Community feedback

  • Account deletedPosted over 2 years ago

    Hey there! 👋 Here are some suggestions to help improve your code:

    • The "illustration" and “music icons” in this component are purely decorative. ⚠️ Their alt tag should be left blank to hide them from assistive technology.

    More Info:📚

    https://www.w3.org/WAI/tutorials/images/

    • The only heading ⚠️ in this challenge is the ”Order Summary". Every other text should wrapped in a paragraph element.
    • To properly apply ✅ the border-radius to this component, add it to the component’s container along with overflow:hidden .

    If you have any questions or need further clarification, feel free to reach out to me.

    Happy Coding! 🎆🎊🪅

    Marked as helpful
  • Account deletedPosted over 2 years ago

    Hello!

    You applied a margin on every p element:

    .container  p {
        text-align: center;
        color: #747895;
        font-size: 1.1rem;
        margin: 0px 50px;
    }
    

    So your p element on the plan div took it as well. You can make a declaration with a child combinator:

    .container > p {
        text-align: center;
        color: #747895;
        font-size: 1.1rem;
        margin: 0px 50px;
    }
    

    or add a class on every p that you want to modify, then your price will be on it's place. You just need to change that justify-content: space-around on the infobox CSS or move the plan div to the image div.

    You can take a look on your developer tools, on the "computed" page to check for margins/paddings, etc.

    Marked as helpful
  • Kyrylo Haiduk•420
    @superpooperxxx
    Posted over 2 years ago

    Hi, don't worry it is easy to fix🔥

    • First of all get rid off <div class ="image"> and this <div> <div><a href="">Change</a></div>. They are just redundant.

    • In your css try doing following: In .infobox remove this line justify-content: space-around; Give this <a href="">Change</a> some class and in css add align-self: flex-end

    Happy coding ❤️ Hope this was helpful

    If not, let me know !

    Marked as helpful
  • Hassia Issah•50,390
    @Hassiai
    Posted over 2 years ago

    Use the colors that were given in the styleguide.md found in the zip folder you downloaded.

    To center .container on the page, using grid, change the value of the min-height: 100vh.

    Add a background-size of contain to the body for the background-image to stretch the entire width of the body.

    The payment button has a wrond box-shadow color.

    There is no need for justify-content in .infobox, add a gap to .infobox and give . plan a margin-right of auto, this will put the change at the right-end of .infobox. .infobox={ gap: 10px} .plan{margin-right: auto;}

    Reduce the max-width value of .container for it to fit into smaller screens. max-width: 400px; .

    This challenge requires a media query, in the media query you only have to change the background-image of the body.

    Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here

    Hope am helpful.

    Well done for completing this challenge. HAPPY CODING

    Marked as helpful

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