0

I've been making some great progress so far. I have the sticky footer working the way I would like i.e.

If there is little content show a footer on the screen. If there is lots of content push it down :)

So what I'm trying to do Is to have a nice little border around my body content, until it reaches the footer :)

Alas I've not been able to do that and I've only been able to make it do this: http://jsfiddle.net/dcf104/ZQEGw/

Can you adise me on some additional code?
Maybe I need some extra <divs>?

You can see the red sides only go so far...

How can I make them go all the way to the footer?

Many Thanks, and your help is much appreciated

Dominic Francis
  • 409
  • 5
  • 8

2 Answers2

1

Set .page-wrap like that:

.page-wrap {
      margin-bottom: -180px;
      height: 100%;
 }

http://jsfiddle.net/ZQEGw/1/

  • The one problem with this is that when you then have long content it goes behind the footer :( http://jsfiddle.net/dcf104/ZQEGw/14/ – Dominic Francis Aug 18 '13 at 12:38
0

This article describes a sticky footer:

You can take a look at the gist or the example on codepen

The CSS

html, body { margin:0; padding:0; height:100%; }
#container { min-height:100%; position:relative; }
#header { background:#ff0; padding:10px; }
#body { padding:10px; padding-bottom:60px;  /* Height of the footer */ }
#footer { position:absolute; bottom:0; width:100%; height:60px;         
            /* Height of the footer */ background:#6cf; }

The basic html structure

   <div id=container>
     <div id=header>
     </div>
     <div id=body>
     </div>
     <div id=footer>
     </div>
   </div>
Community
  • 1
  • 1
surfmuggle
  • 5,527
  • 7
  • 48
  • 77