Design comparison
Solution retrospective
What do you think about it ?
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
Hello there π. Congratulations on successfully completing the challenge! π
- I have other recommendations regarding your code that I believe will be of great interest to you.
COMPONENT MEASUREMENTS π:
- Use
min-height: 100vh
forbody
instead ofheight: 100vh
. Setting theheight: 100vh
may result in the component being cut off on smaller screens.
- For example; if we set
height: 100vh
then thebody
will have100vh
height no matter what. Even if the content spans more than100vh
.
- But if we set
min-height: 100vh
then thebody
will start at100vh
, if the content pushes thebody
beyond100vh
it will continue growing. However if you have content that takes less than100vh
it will still take100vh
in space.
.
I hope you find this helpful π Above all, the solution you submitted is great !
Happy coding!
Marked as helpful0@istfredyPosted over 1 year ago@0xAbdulKhalid Hello and Thank you very much, I learn a few things new :)
0 - @Bader-IdrisPosted over 1 year ago
some advice on fixing your prices.
you can put both
prices
into a div and give that divdisplay: relative
, and its childrenposition: absolute;
, then you can modify top and left of these prices, especially the crossed one. I hope it's helpful.to Summarize:
div.parent { display: relative; } div.parent .children { display: absolute; } div.parent :last-child { left: 30px ; }
0@istfredyPosted over 1 year ago@Bader-Idris Thank you, But i hadn't seen on the design that in fact the two prices are perfectly on the same line.π In the future I will observe the design more carefully.π€
0@VCaramesPosted over 1 year ago@Bader-Idris @ MrDeveloper01010
Thereβs no need to use
absolute
/relative
in this challenge. Especially for the prices. Just place both prices inside adiv
and applyflex
along withalign-items: center
and finally give it agap
.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