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

Designed stats-preview page using html, css, bootstrap

Rakshith J 240

@rakshithjodukallu

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


Designed this using html, css and bootstrap. for one point i stop for a moment for image part because if we declare as background image its not visible in mobile size and cant make image color violet. so here we have to use blend mode method property. Added gradient property for text and moving continuously. Hope You like it and waiting for your comments.

Community feedback

Lucas 👾 104,440

@correlucas

Posted

👾Hello @rakshithjodukallu, Congratulations on completing this challenge!

Amazing solution! I liked a lots the gradient text colors. Maybe I'll get inspiration to add this to my solution too

Something you can do to improve it is keep the text content attached with the image instead of separated, otherwise it will not seem like a component.

1.The easiest way to build this component and make sure that each column will have 50% of the container size is by using GRID. All you need to do is to use display: grid to activate the Grid and then make the two columns with grid-template-column: 1fr 1fr and its done, now you’ve two columns. For the MOBILE VERSION you can switch to flex creating a media query using display: flex and flex-direction: column-reverse to make the image appear before the text content.

2.To make the image have a better fit inside of it, make the component image responsive with display: block and max-width: 100% (this makes the image fit the column/div size) and respect the component size while it scales down. To make it crop while scaling use object-fit: cover.

img {
    display: block;
    object-fit: cover;
    max-width: 100%;
}

✌️ I hope this helps you and happy coding!

Marked as helpful

0

Rakshith J 240

@rakshithjodukallu

Posted

@correlucas Updated the code like you said. Thanks brother.

0
Lucas 👾 104,440

@correlucas

Posted

@rakshithjodukallu This is nice! Keep posting amazing challenges!

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