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

Using CSS Layout

@EbvidPro

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


  1. Is my code neat enough?
  2. Please someone should help me with the image filter, I was not able to do that.
  3. Point out some necessary aspects I still need to improve on.

Thanks.

Community feedback

P

@MarkoNikolajevic

Posted

Hi David, you did a nice job with this challenge!

I've a few suggestions for you

  • you could use display: grid; to recreate the 2 columns grid layout instead of using float and display: table;. I think it's easier using grid.
  • here a useful link about using filter on images https://www.w3schools.com/cssref/css3_pr_filter.asp
  • another solution for the image filter is creating a sort of overlay on it using a div or a pseudo element as ::after and apply on it a background: /* color value */

Your html and css code is clear. Keep on coding :)

1

@EbvidPro

Posted

@MarkoNikolajevic Thanks. I'm happy to hear that, I will do well to edit and try them again using the suggested method.

Looking forward to more of your feedbacks on my next challenge.

1
P

@MarkoNikolajevic

Posted

@EbvidPro I will with pleasure!

I just noticed that your font-family is not the same as the one of the design :)

1

@EbvidPro

Posted

@MarkoNikolajevic Yes. I forgot to even include that as one of the questions.

I was not able to use any of the font. I tried using @import method in CSS and I was yet not able to include the font provided.

I don't know if you have any suggestion or method I can use to do that.

0
P

@MarkoNikolajevic

Posted

@EbvidPro you could use the link tag in your html and then set the font family in your css.

This is one example using Roboto in your html file

<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">

in your css file

font-family: 'Roboto', sans-serif;
1

@EbvidPro

Posted

@MarkoNikolajevic Thanks so much.

You've really helped me to learn some new things.

0
soransh singh• 1,025

@soransh-singh

Posted

hey, I was also not able to apply Image filter. So I do a trick where I decrease the opacity of Image to 50% and made the background-color soft purple to make the Image look like the one given in design, it worked for me

0

@EbvidPro

Posted

@soransh-singh ohhh, Okay. Let me try that.

Thanks.

0

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