Click here to Skip to main content
13,002,275 members (67,380 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


12 bookmarked
Posted 11 Oct 2013

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 :)


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

765 members

You may also be interested in...

Comments and Discussions

GeneralCan be Optimized... Pin
Nitij Kumar28-Feb-14 18:00
professionalNitij Kumar28-Feb-14 18:00 

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

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

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170624.1 | Last Updated 28 Feb 2014
Article Copyright 2013 by ASP.NET Community
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid