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

Udpated flexbox solution with tips from the community

Ivaβ€’120
@Ivuska
A solution to the Order summary component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello from almost sunny Prague!

I have updated my solution of order summary component with the advices and tips from the community's feedback.

Hope it is better now.

Keep coding!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Vanza Setiaβ€’27,715
    @vanzasetia
    Posted over 3 years ago

    Greetings, Iva! πŸ‘‹

    Congratulations on finishing this challenge! πŸŽ‰ It's great to know that you care about accessibility.

    Regarding your questions:

    • When I was a FREE member, all I did was open a new tab and display the design image. Then I just kept switching back and forward, comparing it with my site. πŸ˜† The other thing that you can do is put all the design images on the design tool like Figma and try creating a box to kind of measure the size. Jessica Chan known as Coder Coder use Adobe XD to measure the size of the element when doing the Easy bank landing page challenge.
    • I would recommend using the correct native HTML element. There's no need for a role attribute as long as you can use the native HTML markup. I also recommend doing a lighthouse audit before you upload your solution. It also will test the accessibility of your site. Also, there's an article from Scott O'Hara about landmarks.

    I notice that you have written a note in the style.css file. That's great! πŸ‘ It would be helpful if you put it in the README.md so that people can learn it too. By doing that, it's also showing your knowledge and it's always a good thing.

    Also, I would recommend focusing on the quality of the code instead of trying to make your solution as pixel-perfect as possible. As long as it looks similar to the original design, then I think it's perfectly fine.

    That's it! I hope this information is useful! Happy coding! 😁

    Marked as helpful
  • Graceβ€’32,130
    @grace-snow
    Posted over 3 years ago

    This looks pretty good to me. A few tips

    • try to get box shadow more like the design
    • content is hitting all sides of my phone screen. Some padding on body or margin on the card should sort that
    • make sure text is always in meaningful elements. Price isn't in a paragraph atm
    • I'd make annual plan a heading tbh, but that's your choice
    • curious - why is proceed a button and change an anchor tag? What do you expect to happen with each of those?
    • I'm not sure the alt text of the first image really describes it... Something like "illustration of a woman enjoying listening to music and dancing". You never need to include words like "image of" in alt descriptions (it's already an img element)
    • no need for font-size: 16px; on the body element. That's the default anyway. If you did change font size on there it's essential for it to be in rem not px
    • whenever you have interactive elements it's important to include focus visible styles, not just hovers. Very important for keyboard users - make them nice and obvious like a bold outline

    Hope this is helpful

    Really nice to see learning notes in this, well done

    Marked as helpful
  • Mushfiq Rahmanβ€’300
    @Ayon95
    Posted over 3 years ago

    Hi, your solution looks good. It's a bit tricky to guess the dimensions of elements accurately from images alone. There's a screenshot-taking software called Greenshot that you can use to measure distances and such. The PerfectPixel Chrome extension is also useful. It allows you to put an image overlay on top of the coded website. You can use it to compare the design with the actual website.

    As for good accessibility practices, use semantic HTML elements appropriately whenever you can. Get familiar with some commonly used ARIA attributes and when they are necessary (MDN has an article on each of them). If you're using Windows, you can download NVDA screen reader to test how a screen reader reads your website.

    • PerfectPixel
    • Greenshot
    • W3C Accessibility Tutorials
    • The A11Y Project
    • ARIA Attributes
    • NVDA screen reader

    Hope this helps :)

    Marked as helpful
  • Dev Rathoreβ€’2,540
    @GitHub-dev12345
    Posted over 3 years ago

    used this CSS Property in your card to increase and decrease the size of card:

    1.In Card design CSS Code Used this:

    transform : scale(0.8); this property decrease the size of card. πŸ˜‰

    large size for increase the number of scale & small size for decrease the number of scale

    And used this code for background image : In body tag used this CSS property: body{ background : url("./images/uesd image path") no-repeat; background position: top center; background size: 100% 50%; ( this is your choice check the image performance, and the gave the size percentage on your choice); this code very helpful for your background imageπŸ˜‰πŸ˜Ž keep it up; } this code helpful for you, plz click on the mark the 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

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