@elaineleung
Posted
Hi Fahatmah, well done putting this one together, as it's not too easy to do! I think two quick suggestions I have here:
-
For the
body
selector, try usingjustify-content: flex-start
instead ofcenter
. When I'm resizing the window and my browser height is greater than the height of the contents, the contents are given room to stretch and to center itself to the body canvas size, and so there would be this empty white space at the top because the browser now has space to center the component. I thinkcenter
is a good choice for the challenges where it's only a component displayed and it's all centered in the design; otherwise, for pages, I would recommend keeping it atflex-start
. -
It looks like you still need an overlay for the navbar! Here's some CSS in case you need some quick inspiration; you can just wire it up to the JS, maybe fix the z-index also, and then that should work.
.overlay { position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: hsl(0, 0%, 0%); opacity: 0.3; }
Anyway, everything looks quite well done to me, especially the dropdown navs and mobile nav; the spacing and sizes of the image and textbody was also done well, as this is something I see most people struggle with, especially in getting things to be in an optimal size. Great work here once again!
Marked as helpful
@Fahatmah
Posted
@elaineleung I forgot the overlay๐ thank you for the CSS, really appreciate it! Very thank you also about the body, I was really confuse if I should center it or just let it on top. Now I know. Thank you again!
@elaineleung
Posted
@Fahatmah No problem, glad to help! ๐