

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create a fixed/sticky footer with CSS?
To create fixed footer with CSS, the code is as follows −
Example
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body{ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } .footer { font-size: 20px; position: fixed; left: 0; bottom: 0; width: 100%; background-color: rgb(50, 6, 100); color: white; text-align: center; } </style> </head> <body> <h1>Fixed/Sticky Footer Example</h1> <div class="footer"> <p>All rights reserved ©</p> </div> </body> </html>
Output
The above code will produce the following output −
- Related Questions & Answers
- How to create a fixed/sticky header on scroll with CSS and JavaScript?
- How to create a sticky image with CSS?
- How to create a sticky element with CSS?
- Create a sticky navbar with CSS
- How to create a "sticky" navbar with CSS and JavaScript?
- How to create a "fixed" menu with CSS?
- How to create a fixed side navigation menu with CSS?
- How to create a fixed social media icon bar with CSS?
- CSS position: sticky;
- How to Create an On Scroll Fixed Navigation Bar with CSS?
- Fixed Positioning with CSS
- How to create table footer in HTML?
- Role of CSS position: sticky;
- How to create footer for Bootstrap 4 card
- How to create a pagination with CSS?
Advertisements