Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Flex Box CSS

daniDev6 150

@daniDev6

Desktop design screenshot for the Results summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I use many divs, is it correct to use so many divs? If you can give me advice it would help me

Community feedback

geektim 230

@geektim

Posted

This is a very awesome work. I also used a lot of divs when I did mine, and was worried about it. So, i checked the solutions of some people who already did the challenge, I figured it is better to first use html semantics like 'header, main, aside, section, article' or the likes like that, to first wrap up the elements before splitting into divs. Those semantics I mentioned are also block level elements, so, they stack. I hope you find this somewhat helpful.

Marked as helpful

2
A. Then 10

@a-then

Posted

Awesome work with this! I like how you organize your CSS.

Editing this to answer your question about divs

The documentation says to use div for styling purposes only, when there is NOT a better semantic option. If you have to optimize for accessibility, I'd do <main> instead of a <section> for your .card-container. Keep the <article> as you have it and then make .card-result and .card-description into sections. But it depends on your logic because you can totally make .card-item a section and .card-result and .card-description as article elements within if you think each is shareable content that would make sense on its own (ie. share result as a tweet)

<main>
    <article>
        <section>
            <h2>...</h2>
            <div> ... </div>
            ...
        </section>
        <section>
            <div> ... </div>
            <div> ... </div>
            ...
        </section>
    </article>
</main>

Like I said, this looks great, It's crazy how close you got to the original. If I have to nick-pick it, I'd suggest these two things:

  • tweak your box-shadow property to make a softer shadow that only appears at the bottom and right edge.
  • Delete the starting README.md file and update README-template.md to showcase your thought process/lessons/insights. You never know who might be watching!! 👀

Keep up the good work!

1

Please log in to post a comment

Log in with GitHub
Discord logo

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