Design comparison
Solution retrospective
I am pretty new to this but I tried my best. The visuals are not exactly how it was supposed to be. I am clueless on the background part. what exactly do I use?
Also, the horizontal line that is dividing two parts is also not like it was supposed to be. Can anyone tell me where I am going wrong?
Community feedback
- @herbrasPosted over 3 years ago
Congrats for your Solution.
For background, you can use background-position. You can add value (top, bottom, right, and left). play this https://developer.mozilla.org/en-US/docs/Web/CSS/background-position
For horizontal separator, you can use bordet-top on container class (stats) and fill with lightray hsl color, solid line, and small pixel.
Keep going and Happy Coding! :)
1@ijyotimaurya150Posted over 3 years agoHey @herbras! You were right about the background-position. Thanks for the link too. And yes border-top/border-bottom is the solution to my <hr> problem. Thanks once again. 😃
0 - @RayaneBengaouiPosted over 3 years ago
Hello ijyotimaurya150,
First of all, congrats for your first challenge !
For the background images, they are quite tricky to size correctly, but by playing with percentages and
calc
I guess you can find a way.To create the horizontal separator you are using an
<hr>
tag which is not necessary here. You can add aborder-bottom: solid lightgray 1px
to your#cardMiddlePart
and it should work.Overall, well done for the challenge and happy coding ! 😃
1@ijyotimaurya150Posted over 3 years ago@RayaneBengaoui Oh man! your second solution was totally correct. Thank you so much for the help. 🤗
0 - @AgataLiberskaPosted over 3 years ago
Hi @ijyotimaurya150! I would use pseudoelements for the background circles, but I struggled with them quite a lot, so that may not be the best solution.
However, I can help a bit with your second question. You're using a
<hr>
element here, and you've defined a border all around it. Since you can't make a line smaller than 1px on a screen (so using 0.1px won't work), that makes your rule 2px tall. What you can do is just have aborder-top
(orborder-bottom
). You can also set a lower opacity to make it look lighter.Hope this helps :)
1@ijyotimaurya150Posted over 3 years ago@AgataLiberska Oh yeah! Thank you so much for your help related to my 0.1px border. I finally got the clarity now. Thanks once again 😋.
0
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