0

I have read all the tutorials on how to make the footer at the bottom of the webpage but still i'm unable to do it for my site.

The links i have referred are

None of it worked..!

CSS

#footer1 {
clear: both;
background-color: #333;
width: 1200px;
min-width: 100%;
width: 100%;
bottom: 0;
position: relative;
height: 50px;
border-top:5px solid #1b9bff;
}

Here is the dummy fiddle of my site

Fiddle

This is the fiddle i have tried but there is a bug in it too

  1. http://jsfiddle.net/andresilich/fVpp2/1/
Community
  • 1
  • 1
Amarnath Balasubramanian
  • 9,300
  • 8
  • 34
  • 62

3 Answers3

0

Try this:

<div id="container">
  <div id="content"></div>
</div>
<div id="footer">My Sticky Footer</div>

CSS:

html, body, #container { height: 100%; }
body > #container { height: auto; min-height: 100%; }

#footer {
   clear: both;
   position: relative;
   z-index: 10;
   height: 3em;
   margin-top: -3em;
}

#content { padding-bottom: 3em; }
wahid
  • 1,150
  • 1
  • 9
  • 16
0

Add/Edit as following

#body {
margin-bottom: 85px;
position: relative;
}

#footer1 {
position: fixed;
}


I guess this is what you want

* html #form1 {
    height:100%; 
}

#form1 {
    min-height: 100%;
    position: relative;
}

#body {
    padding-bottom: 50px; /* padding-bottom should be equal to the footer height (this keeps the footer from overlapping the content) */
}

#footer1 {
    position: absolute;
    width: 100%;
    clear: both;
    bottom: 0;
    padding: 0;
    margin: 0;
}
4dgaurav
  • 11,360
  • 4
  • 32
  • 59
0

Following the code of this method - you need to to:

1) Place your footer outside the form

2) Add height: 100% on form

3) Set negative bottom margin to form according to the height of the footer.

form {
    min-height: 100%;
    height: 100%;
    margin: 0 auto -150px; /*footer 150px high */
}

Modified Fiddle

Danield
  • 121,619
  • 37
  • 226
  • 255