Search code examples
cssmargins

CSS Issue with the footerwrapper


I can't figure out why I am unable to get my footer wrapper and the elements inside to center up with the rest of the page. I'm using this code and it is not working:

#footer-wrapper{ margin:0 auto; }

If someone has a minute and can take a look, I would appreciate it. http://skeeterz71.com/auto/

Thanks


Solution

  • When you're aligning content with margin: 0 auto; you need a set-width because divs are automatically 100% which basically means the width of the window which means there's no space to center.

    Also, it's better for the wrapper to be within a parent.

    See this: http://jsfiddle.net/cranavvo/zKMD5/