Exploring some css techniques. I'm attempting to display the footer on the page without requiring a scrollbar. My approach involves subtracting the footer's height from the content wrapper div. Unfortunately, this method doesn't seem to be effective.
@media (min-width: 769px) {
.wrap {
/* for Sticky Footer */
/* viewport height aspect ratio, with 100 being 100% of view port height */
/* using calc function to calculate 100% of viewport minus footer height */
min-height: calc(100vh - 121px);
}
.container {
/*color: red;
*/
width: 70%;
margin: 0 auto;
max-width: 1000px;
}
}
<div class="wrap">
<header class="main-header">
<div class="container">
<h1 class="name"><a href="#">Best City Guide</a></h1>
<ul class="main-nav">
<li><a href="#">ice cream</a></li>
<li><a href="#">donuts</a></li>
<li><a href="#">tea</a></li>
<li><a href="#">coffee</a></li>
</ul>
</div>
</header>
<div class="container">
<h2>Welcome!</h2>
<p>Everything in this city is worth waiting in line for.</p>
<p>Cupcake ipsum dolor sit. Amet chocolate cake gummies jelly beans candy bonbon brownie candy. Gingerbread powder muffin. Icing cotton candy. Croissant icing pie ice cream brownie I love cheesecake cookie. Pastry chocolate pastry jelly croissant.</p>
<p>Cake sesame snaps sweet tart candy canes tiramisu I love oat cake chocolate bar. Jelly beans pastry brownie sugar plum pastry bear claw tiramisu tootsie roll. Tootsie roll wafer I love chocolate donuts.</p>
<h2>Great food</h2>
<p>Croissant macaroon pie brownie. Cookie marshmallow liquorice gingerbread caramels toffee I love chocolate. Wafer lollipop dessert. Bonbon jelly beans pudding dessert sugar plum. Marzipan toffee dragée chocolate bar candy toffee pudding I love.
Gummi bears pie gingerbread lollipop.</p>
</div>
</div>
<footer class="main-footer">
<p>©2015 Residents of The Best City Ever.</p>
</footer>
Any thoughts on why it's not functioning as intended?