Sticky Footer
How do I make an sticky footer?
Content will push it down, but if there isn't enough content, it sticks to bottom. What is a sticky footer? How do you make a sticky footer? This script and codes were developed by Chris Coyier on 04 July 2022, Monday.
Sticky Footer - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Sticky Footer</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <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> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Sticky Footer - Script Codes CSS Codes
/* Mostly: http://ryanfait.com/sticky-footer/ */
* { 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;
}
Sticky Footer - Script Codes JS Codes
$("#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");
});
Developer | Chris Coyier |
Username | chriscoyier |
Uploaded | July 04, 2022 |
Rating | 4.5 |
Size | 2,089 Kb |
Views | 58,696 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Make This Responsive | 2,086 Kb |
Generate Mobile Version of Table | 3,077 Kb |
Search Box in Content Moves to Fixed Header | 2,768 Kb |
Striped Headers | 3,177 Kb |
JQuery and CoffeeScript | 3,185 Kb |
Label Pattern with just CSS | 3,617 Kb |
Load External Data in React | 2,949 Kb |
CssPanelMenu | 4,062 Kb |
Bar Navigation with Flexbox and SVG icons | 5,995 Kb |
Voting is our Voice | 3,883 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
IE flex collapse bug fix | Rowno | 2,678 Kb |
SVG Transform vs CSS Transform | AmeliaBR | 4,175 Kb |
Experiments with Vertical Centering | KatieK2 | 3,924 Kb |
Mega menu | DimaZubkov | 5,066 Kb |
Gradients | Karpovsystems | 2,394 Kb |
Preloader | Rikki_Sixx | 2,815 Kb |
Ripples in water | Nobitagit | 2,704 Kb |
AOR site logo | Thatbram | 2,527 Kb |
Draggable directive | YahyaKacem | 2,277 Kb |
Emberjs Bootstrap Modal Carousel | Somethingkindawierd | 4,233 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!