Results 1 to 1 of 1
-
23rd Sep 2017, 05:47 PM #1
Sticky Footer
Code:<div class="page-wrap"> <h1>Sticky Footer</h1> <h2>with Fixed Footer Height</h2> <button id="add">Add Content</button> </div> <footer class="site-footer"> I'm the Sticky Footer. </footer>
Code:* { margin: 0; } html, body { height: 100%; } .page-wrap { min-height: 100%; /* equal to footer height */ margin-bottom: -142px; } .page-wrap:after { content: ""; display: block; } .site-footer, .page-wrap:after { /* .push must be the same height as footer */ height: 142px; } .site-footer { background: orange; }
Code:$("#add").on("click", function() { $("<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>").appendTo(".page-wrap"); });
EasyMoney Reviewed by EasyMoney on . Sticky Footer <div class="page-wrap"> <h1>Sticky Footer</h1> <h2>with Fixed Footer Height</h2> <button id="add">Add Content</button> </div> <footer class="site-footer"> Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 2 users browsing this thread. (0 members and 2 guests)
Vn5socks.net 28-10-2024 | socks 5...
Live | 108.181.132.118:60677 | United States |...