Design comparison
Solution retrospective
Dear All,
Here is my first project using JavaScript which was challenging, but fun at the same time. Overall, I am not very satisfied with my CSS, it just ended up being rather messy (again) despite the fact that the outcome looks fine. Any suggestions?
Cheers,
Dalma
Community feedback
- @TomasPereira-DevPosted about 1 year ago
Hey, what's up? I just read your code, hope this tips helps you a little.
1)The background from the container uses a gradient instead of a solid color, that's what makes that light-gray-to-black effect, here is more information about it.
2)You need to add a the max-width prop to the paragraph, that's what makes the brakes of line, when using it to limit text lines you need to use the ch unit, what it does is counting an amount of characters based on the space of a 0 in your font, for example 30 ch = 30 (0) characters.
3)Avoid absolute positioning, it makes everything more hard that it should be, in this case you only need to use flexbox, notice the amount of space between the star and the paragraph, notice how it's the same between the paragraph and the numbers, you can achieve this using the gap property for flexbox, what it does is adding a even gap between every element in a container, not margin needed, you will use it a lot.
This is all I got for now, good luck!.
Marked as helpful0@bdal90Posted about 1 year agoDear @TomasPereira-Dev,
Thank you, very helpful of you! Honestly, I didn't notice the gradience :S .... I've never heard of chain unit, I'll definitely chexl it out.
Cheers,
Dalma
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