I am facing a seemingly simple problem that is causing me quite a bit of confusion.
For instance, in the code snippet provided, the header
should have a height of 130px and the footer
should be 20px tall. I require a certain min-width
for my #landing-page-container
so that the footer is always at the bottom of the current view (even if the content exceeds the initial view).
Here's the codepen example:
.container{
position: absolute;
min-height: 100vh;
min-width: 100%;
}
#header-container{
position: relative;
height: 130px;
background-color: red;
}
#landing-page-container{
position: relative;
height: 100%;
background-color: blue;
}
#footer-container{
position: relative;
height: 40px;
background-color: green;
}
<div class="container">
<header id="header-container">
Here is some navbar
</header>
<section id="landing-page-container">
Here is some content
</section>
<footer id="footer-container">
Here is footer
</footer>
</div>
I find myself a bit overwhelmed with all the positioning and display properties in CSS.