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

Preview Card By Using HTML, CSS

It's me L 70

@Todayimfalllinlove

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I don't know why the element is not in the center hahahaha, pls tell me.

Community feedback

@walkonmars36

Posted

Hi

These don't need to be links

  <ul>
          <li>10k+ <a href="#">companies</a></li>
          <li>314 <a href="#">templates</a></li>
          <li>12m+ <a href="#"> queries</a></li>
  </ul>

Using a list is the right way to go, but for each list item you could specify two <spans>, for example,

  <ul>
          <li>
               <span>10k+ </span>
               <span>companies</span>
          </li>
  </ul>

Make your span's display:block, as they are inline by default, meaning they'd sit next to each other and give each one a class name to control the styling.

Also on your main, setting a width, say of 90% and a max-width of around 1110px (use the rem equivalent) will give you some space either side of the card on mobile and ensure it doesn't grow beyond a maximum size on desktop.

There's a few other things, but this should help you 🙂

Best wishes

Marked as helpful

2
Atif Iqbal 3,200

@atif-dev

Posted

**Hi! Congrats🎉 on completing the challenge. You need to use flex-direction: column; in body selector for centering.

Marked as helpful

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