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

Order Summary Card using CSS and Flexbox

sass/scss
Stephen Nicholls•20
@stevednick
A solution to the Order summary component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I've used rem measurements extensively throughout. I have no idea if this is good practice and if not would love suggestions as to how I can improve this.

Very happy to receive suggestions for improvements. Thanks a million.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Grace•32,130
    @grace-snow
    Posted over 3 years ago

    Hello

    This looks pretty good overall except the attribution is overlapping the component on mobile - no need to position that absolutely

    Here are some tips for improvement

    • look up how and when to write alt text on images, and how to treat decorative images
    • you have some invalid html in here at the moment, opening h2 tags but closing h3 tags
    • annual price and the price can't b I th be headings, that makes no sense. If Annual price is the heading, then the price is the content belonging to that heading - a paragraph
    • think again about when to use buttons and when to use anchor tags. What is it you expect proceed to do? What is it you expect change to do? (If this was a real project) It's really important to choose the right element for the job
    • not sure why you have two media queries in here. Most of your css is mobile first except the background image on body for some reason(?) I'd switch that, use the mobile image as the default and move the desktop background into the min width media query you've already got

    Well done on this, good work so far. And yes absolutely use rems, that's spot on. It means everything will scale together no matter the users zoom or font size settings

    Marked as helpful
  • PhoenixDev22•16,830
    @PhoenixDev22
    Posted over 3 years ago

    Greeting stevednick , Great work , your solution is really good. To get rid of the accessibility issue I would suggest to replace <h3> by <h2> click here to read more. keep and happy coding

    Marked as helpful
  • Anosha Ahmed•9,300
    @anoshaahmed
    Posted over 3 years ago

    To get rid of the accessibility issue shown in your Report, start your headings with <h1>, and move up by one level each time

    Great job! :)

    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 1st-party linked stylesheets, and styles within <style> tags.

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.

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

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