Sticky Footer Using calc

/*HTML*/ <div class="wrap"> <div class="main-header"> <div class="container"> ... </div> </div> <div class="container"> ... </div> </div> <!-- /.wrap --> /*CSS*/ .wrap { min-height: calc(100vh - 89px); }
Use calc() to write a mathematical expression that will subtract the footer height from the viewport's total height.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.