Stats Preview Card Component using Flexbox
Design comparison
Community feedback
- @VCaramesPosted about 2 years ago
Hey there! 👋 Here are some suggestions to help improve your code:
- This challenges requires the use of two images 🎑 for different breakpoints. The
picture
element will facilitate this.
Here is an example of how it works: EXAMPLE
Syntax:
<picture> <source media="(min-width: )" srcset=""> <img src="" alt=""> </picture>
More Info:📚
https://www.w3schools.com/html/html_images_picture.asp
- The only heading in this component is the “Get insights that help your business grow” everything else will be wrapped in a
paragraph
element.
- The statistics at the bottom are a list, so it should be built using an
unordered List
element.
More Info:📚
MDN <ul>: The Unordered List element
- To get the image to look like the FEM example, you are going to want to use the
mix-blend-mode
along with themultiply
value and include aopacity
with the value of 0.8.
Code:
img { opacity: 0.8; mix-blend-mode: multiply; }
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding!🎄🎁
Marked as helpful0@thejacksheltonPosted about 2 years ago@vcarames incredibly helpful stuff!
I've used the picture element before, but I realize that I need to be using it way more often haha.
-
I've gone ahead and added the picture and replaced the two wrappers and overlay divs with it.
-
I've removed any other headings and used an unordered list with li tags in order to style the stats area.
-
I then added the mix-blend-mode property and opacity like you recently mentioned.
I wasn't aware that this property even existed! I'll be studying this lol. Really appreciate the feedback :)
0@VCaramesPosted about 2 years ago@thejackshelton
I am glad that I was able to help out!
It happens to the best of us. Lol
Keep it up!
1 - This challenges requires the use of two images 🎑 for different breakpoints. The
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