Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Responsive Mobile-First time-tracking-dashboard

Barbara Ward•1,160
@bward67
A solution to the Time tracking dashboard challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This was a huge challenge for me. I first inserted the images on the cards as background images and placed them in the correct places BUT then when it came to the JS and I was appending a new section for the cards I realised I must insert them in my HTML rather than in my CSS. I had also used Flexbox on the cards but had to change them to Grid as it worked so much better when switching to a larger screen size.

The JS was an enormous challenge and so I eventually watched a youtube video from Seer Studio and it was really good - I learned sooooo much! Thank you Seer Studio - you should make more videos!. This is the link to Seer Studio: https://www.youtube.com/watch?v=l9Qw8y3LfCY

In the end it is not absolutely perfect as there is a very slight colored outline around the cards but maybe I will awake up in the middle of the night some time soon with the solution on how to fix it :) - ahh come on - we've all done that!!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Arne•1,140
    @Dudeldups
    Posted over 1 year ago

    Hello!

    Good looking solution! Let me give you a few tips:

    The single pixel tearing in the corner of the card is a common issue with those wrapped elements with different background colors. I solved it by changing the color of the colored card to a linear gradient. So at the top you have the custom color and at the bottom the dark blue color, something like this:

    linear-gradient(cardColor 0%, cardColor 75%, blue 75%, blue 100%);

    Regarding your HTML, the h1 of a site should be the main heading of a site. Using Jeremy's name is not really appropriate here, it should be something like "Time tracking dashboard" or similar, visually hidden with CSS. Yeah I know, the smaller component-sized FEM challenges don't provide proper h1 headings. The headings inside the six cards should be "work", "play", etc. and not the time. You only created divs there, divs with only text are not semantically correct. Pure text should be wrapped inside a <p> or <span> or similiar, as needed.

    The site is missing a <main> element (usually a child of the <body>).

    In your CSS, you are setting the body's font size in px while you should do this with rem. If a user changes the default browser font size, your site will not adjust so the user won't see any changes.

    Using !important in a CSS file is generally bad practice, just as using id selectors. The selectors have different specificity, id selectors have the highest, then class selectors and then element selectors. If you use id selectors you end up having problems to overwrite this style (for example for .active classes, :hover states etc.). If you try to keep it to class selectors, the need for !important should be gone.

    When you look at the container between 565px and 1200px, it is missing space to the corner of the screen (you removed its margin at the breakpoint).

    And one small thing, you forgot to center the dashboard vertically 🤓😀

    Hope this helps, happy coding! 👾

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

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