Click here to Skip to main content
Click here to Skip to main content

Tagged as

Fixed Div At The Bottom Of The Page

, 28 Feb 2014
Rate this:
Please Sign up or sign in to vote.
Hi everybody,I am going to write an example div fixed in the bottom. First let's write our divs to be fixed in bottom.----------  <div

Editorial Note

This articles was originally at but has now been given a new home on CodeProject. Editing rights for this article has been set at Bronze or above, so please go in and edit and update this article to keep it fresh and relevant.

Fixing a <div> at the bottom of the page

Hi everybody,
I am going to write an example div fixed in the bottom. First let's write our divs to be fixed at the bottom.

<div id="ContainerDiv">
    <div id="InnerContainer">
        <div id="TheBelowDiv">
            I'm at the bottom of the page.

Now let's write our CSS codes.

#ContainerDiv {
  margin: auto;
  position: fixed;
  margin: auto;
  left: 0;
  bottom: 0;
  width: 100%;

#InnerContainer {
  width: 100%;

#TheBelowDiv {
  font-size: 18pt;
  font-family: Tahoma;
  text-align: center;
  color: white;

After this, we have the div at the bottom. Have a nice day Smile | :)


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

ASP.NET Community

United States United States
The ASP.NET Wiki was started by Scott Hanselman in February of 2008. The idea is that folks spend a lot of time trolling the blogs, googlinglive-searching for answers to common "How To" questions. There's piles of fantastic community-created and MSFT-created content out there, but if it's not found by a search engine and the right combination of keywords, it's often lost.
The ASP.NET Wiki articles moved to CodeProject in October 2013 and will live on, loved, protected and updated by the community.
Group type: Collaborative Group

247 members

Comments and Discussions

GeneralCan be Optimized... PinprofessionalNitij Kumar28-Feb-14 18:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140821.2 | Last Updated 28 Feb 2014
Article Copyright 2013 by ASP.NET Community
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid