Design comparison
Community feedback
- @SJ-NosratPosted over 3 years ago
Hi Geoff, Good looking project! Nicely done!
However, did you notice that your footer is at the top of your webpage?
That's because you have your
<main>
with a height of zero (0). And the reason for that is probably you have an element floating somewhere in the CSS rules you've applied.I tried to add the
overflow: hidden;
to the<main>
but to no avail. I think one other thing that is causing your<main>
height to become zero is that you're not giving the parent container aposition: relative;
whenever you're applying aposition: absolute;
to it's children. For example:main { position: relative; } .card { position: absolute; }
From the above code I had the
<main>
tag to haveposition: relative;
since you addedposition: absolute;
to the class.card
.Now here's where things to wacky; you added
position: absolute;
to the class.card__summary
but then that means you have to addposition: relative;
to the class.card
, however you've already addedposition: absolute;
.The problem is coming from the way you're going about centering your content; a solution would be to remove all the
position
styling, and add adisplay: flex
to the<main>
and center it that way, since I clearly see that you know how to use CSS Flexbox by adding flexbox rules to the.card__summary
class.Hope the above helps!
Best of luck with your coding journey!
Marked as helpful1
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