Designed stats-preview page using html, css, bootstrap
Design comparison
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
- @correlucasPosted about 2 years ago
👾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 usedisplay: grid
to activate the Grid and then make the two columns withgrid-template-column: 1fr 1fr
and its done, now you’ve two columns. For theMOBILE VERSION
you can switch toflex
creating a media query usingdisplay: flex
andflex-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
andmax-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 useobject-fit: cover
.img { display: block; object-fit: cover; max-width: 100%; }
✌️ I hope this helps you and happy coding!
Marked as helpful0@rakshithjodukalluPosted about 2 years ago@correlucas Updated the code like you said. Thanks brother.
0@correlucasPosted about 2 years ago@rakshithjodukallu This is nice! Keep posting amazing challenges!
1
Please log in to post a comment
Log in with GitHubJoin 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