Sticky footer without fixed height

Developer
Size
2,288 Kb
Views
6,072

How do I make an sticky footer without fixed height?

Forked from pismenny's Pen Sticky footer without fixed height.. What is a sticky footer without fixed height? How do you make a sticky footer without fixed height? This script and codes were developed by Hai Nguyen on 29 January 2023, Sunday.

Sticky footer without fixed height Previews

Sticky footer without fixed height - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Sticky footer without fixed height</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="out"> <h1>Sticky footer without fixed height</h1> <div class="push"></div>
</div>
<footer class="footer"> <div class="footer-i">Footer content goes here</div>
</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 without fixed height - Script Codes CSS Codes

* { margin: 0;
}
html, body { height: 100%;
}
.out { min-height: 100%; height: auto !important; height: 100%; margin: 0 auto;
}
body { text-align: center; text-transform: uppercase;
}
h1 { margin-top: 0; padding-top: 2em;
}
.out { background: #ededeb;
}
.footer { background: #ee3728; color: #fff; font-weight: bold;
}
.footer .footer-i { padding: 3em 0;
}

Sticky footer without fixed height - Script Codes JS Codes

$(function() {	var footerHeight = $(".footer").height();	$(".out").css("margin-bottom", -footerHeight);	$(".push").css("height", footerHeight);
});
$(window).resize(function() {	var footerHeight = $(".footer").height();	$(".out").css("margin-bottom", -footerHeight);	$(".push").css("height", footerHeight);
});
Sticky footer without fixed height - Script Codes
Sticky footer without fixed height - Script Codes
Home Page Home
Developer Hai Nguyen
Username HaiNguyen007
Uploaded January 29, 2023
Rating 3
Size 2,288 Kb
Views 6,072
Do you need developer help for Sticky footer without fixed height?

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!

Hai Nguyen (HaiNguyen007) Script Codes
Create amazing SEO content with AI!

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!