- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- 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 −
Advertisements
To Continue Learning Please Login
Login with Google