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

Solution using HTML and CSS with Flex and Grid

Kenny Burger•50
@k3nnyburger
A solution to the Results summary component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


🔴 Problems

  • Position and spacing
  • In the mobile view, the text has moved together a bit, what could be the reason or how can this be fixed?

Please give me feedback on better ways to do this or if I'm doing anything wrong. Thank you in advance! 🙂

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • efim•390
    @efim
    Posted about 2 years ago

    Hi! I'm not a senior in frontend dev, but wanted to try to figure out your question: "In the mobile view, the text has moved together a bit, what could be the reason or how can this be fixed?"

    What I did is opened your website in Firefox, entered mobile view with "Ctrl + Shift + M" (or Menu -> More Tools -> Mobile Design Mode) and then opened dev tools with F12.

    The "context menu" (right click) on the text and then "inspect element" highlight that element in the dom in the menu, and also allow us to see sized of "body \ padding \ margin"

    I'm putting the screenshots in my repo and will paste links:

    1. this is me inspecting the element in question: screenshot 1
      you can see that putting cursor at the blue inner rectangle (1) - the body gets highlighted at the page (2), but no padding or margin is detected
    2. then I check elements higher in the hierarchy, and finding this one screenshot 2
      setting cursor to (1) purple "padding" place - highlights the area of your webpage that padding takes (2) so, this is the element that results in text getting smushed
    3. then i can also temporarily change the style right in the browser dev tools: screenshot 3
      setting left and right to 1rem removes this smushing

    You'll probably want to have media queries for mobile size that set different paddings for the element. and maybe even not using paddings to make blue background take whole width, but just make it's width 100% or something. Here unfortunately I can't give specific advice, because I've started almost immediately with TailwindCSS and it's a bit different from css

    Hope this helps!

    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