Collapsing floats in 960 grid
I am trying to use the 960 grid system with header and footer graphics at the top and bottom of the page. These graphics need to go wider than the 960 grid. The header works fine - a DIV, position absolute, width 100%, and centered, does the job perfectly.
But now I want the same thing, but at the bottom of the page. I.e. aligned with the bottom of the footer section. I figured I would attach the background image to the bottom of the .container_16
div, positioned on the bottom. This way, the footer image would always stay with the bottom of the content.
Here is my att开发者_如何学Pythonempt so far: http://www.northtreestudios.com/sandbox
The red line is the border of the body
tag, and the blue line the border of the .container_16
div. I put a clearing div (<div class="clear"></div>
) everywhere I could think of, but I nothing I do will get either the .container_16
div or the body
tag to expand to include the footer!
I have been scouring the web for hours, and I am running out of ideas ...
If this is what you want, then just do this:
#container {
border:2px solid blue;
top:0;
width:960px;
}
Or if you want that navigation to be right at the top do this:
#container {
border:2px solid blue;
top:0;
width:960px;
margin-top:-250px;
}
That might have resolved it but it involved modifying the 960GS framework. If you post your original HTML code I'm happy to investigate why this was happening.
精彩评论