1

I have this very simple footer :

.footer{
    width:100%;
    background-color:#333;
    height:100px;
    position: absolute;  
    bottom: 0px; 
}

and this container :

.container{
    position:relative;
    height:100%;
    width:980px;
    margin:0px auto;
}

The container's (content) height is 100% so it is based on the amount of results you get from your search query. I want the footer to stick underneith the container at all time. And when you have no results I just want to have it at the bottom of the screen.

I tried to give the container a padding-bottom the height of the container and change the posistion but it didn't help. Does anyone has an idea how to solve this?

Vucko
  • 20,555
  • 10
  • 56
  • 107
DiederikEEn
  • 753
  • 8
  • 17

2 Answers2

3

try this:

.footer{ width:100%; background-color:#333; height:100px; position: fixed;
bottom: 0px; }

Changing position absolute with fixed

DEMO

Alessandro Minoccheri
  • 35,521
  • 22
  • 122
  • 171
  • that dindt change anything, still stciks at the bottom of the screen, and doesnt adjust to the height of the container – DiederikEEn Apr 24 '13 at 07:11
-1

see this CSS to make HTML page footer stay at bottom of the page with a minimum height

and http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page
I hope this will helpful for you.

Community
  • 1
  • 1
Pawan Lakhara
  • 1,146
  • 4
  • 16
  • 28