A Sticky footer is a UI element that remains at the bottom of the browser window, even when the user scrolls down the page. Sticky footers are often used on websites to display copyright information, contact information, or other important information that the user should always have access to.
To create a simple sticky footer with HTML and CSS, you can follow these steps:
- Create a new HTML file and add the following code:
HTML
span class="hljs-meta-keyword" style="animation: 0s ease 0s 1 Normal none running none; appearance: none; background: none 0% 0% / Auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); border: 0px none rgb(25, 103, 210); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex: 0 1 auto; float: none; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; font-weight: 700; gap: normal; hyphens: manual; inset: auto; isolation: auto; line-height: 18px; margin: 0px; marker: none; mask: none; offset: none 0px auto 0deg; opacity: 1; order: 0; outline: rgb(25, 103, 210) none 0px; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all 0s ease 0s; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;">html>
html>
head>
title>My Simple Sticky Footertitle>
head>
body>
h1>My Simple Sticky Footerh1>
div id="footer">
p>Copyright © 2023 My Websitep>
div>
body>
html>
- Add the following CSS code to the
section of your HTML file: