Footer positioning with CSS and 960gs

Posted by Nick on Stack Overflow See other posts from Stack Overflow or by Nick
Published on 2010-05-11T04:43:54Z Indexed on 2010/05/11 5:24 UTC
Read the original article Hit count: 374

Filed under:
|
|
|

I'm new to doing layouts with CSS (I haven't done any web design for a long long time) and I can't seem to figure out how to get the footer of the page to display at the bottom the way I want.

Requirements: -Display at bottom of content if content exceeds vertical size of viewport -Display at bottom of viewport if viewport exceeds vertical size of content.

The code that I am using sets the footer at the bottom of the viewport, but if I size the browser to be shorter than the content, it just covers the content.

Code: <div style="background-image:url(footer_bg.jpg); background-position:bottom; background-repeat:repeat-x; height:235px; width:100%; bottom:0px; position:absolute;"></div>

My main goal is to have a footer with text (ie. company info, contact info) and a background gradient. I'd like the footer background to span the width of the page, but I don't know if I can do that with the 960 gs divs.

© Stack Overflow or respective owner

Related posts about div

Related posts about 960