tags:

views:

168

answers:

7

Here at the two links that will display my problem: http://www.wontletthisbeatme.com/information.asp

On the Blog page, you will see that the content and container divs stretch to the bottom nicely even though the content does not require that much space. This places the footer at the bottom and it looks fine. However, in the second link, the information stretches beyond the viewpoint and the container divs and footer do not adjust to accommodate the extra content.

This is an issue I have been having for a while and have yet to really grasp the concept. I have the height:100% placed on my html and body elements as well as my containers but still find myself ineffective with footers in CSS. I have reviewed many links on the web and prior posts but, like I said, cannot get my head around this. Any help would be greatly appreciated.

Update

I have done some tweaking to the pages. Now, the final issue I see is with the information page where the information contained within the content div does not actually stretch the div downward. There are no floats and no reason that I can see that this div should not stretch with its content. Any advice?

A: 

My guess from not looking the source at the moment is an extra or missing <div> or </div> tag was added or removed...

Dan
Run 'em both through http://validator.w3.org or some other validator. There's definitely more errors in information.asp. Get your structure right with the same number of closing tags as opening ones, and things might become clearer, at least.
Matt Gibson
I updated many of the errors. I validate my html and css prior to giving it to my partner who then converts it to asp and populates the content. He isn't too concerned with proper validation.
Slevin
+2  A: 

That is most probably because the footerContainer div position is set to absolute

dejavu
+2  A: 

I think it's because CSS for footerContainer contains the attribute "position: absolute;". Removing it fixes the issue for me.

UPDATE: The container (i.e. contentContainer) stretches correctly if you remove the attribute "height: 100%" from it. But again, I didn' analyze the whole layout.

Diego
Removing the position tag drops the footer below the content but does not stretch the container so the border stretches to the bottom of the footer as well. Additionally, removing that position property affects the Blog page or any page with little content.
Slevin
Your update didn't change anything from what I can tell. I appreciate your suggestions though.
Slevin
As I wrote, when I remove the height from the contentContainer it stretches to the bottom, wrapping everything. Does it work for you?
Diego
It does on the Information page, but does not work then for the Blog page or any other section that contains little content.
Slevin
A: 

use as following;

.clear{clear:both; display:block; line-height:0%;}

and use the .clear as

<div class="clear"></div>
eyoosuf
use <div class="clear"></div> in between the content and the footer
eyoosuf
+1  A: 

You are using position:absolute on the footer bar and the navigation bar. In order to fix this you need to stop using that on both so the navigation bar can push the footer bar down the page instead of giving it a fixed position.

Fabian
The navigation will need to be absolute and is not 'in charge' of pushing the footer down. The contentContainer is to stretch the height of the content and then place the footer below it.
Slevin
+1  A: 

set the .footerContainer to position: relative (or leave out the position-attribute)

Scoregraphic
Making the position relative or removing that property pushes the footer below the content but it does not stretch the border with it and does not keep the footer at the bottom of a page with little content.
Slevin
A: 

What you describe that you want sounds very similar to the problem expressed in http://stackoverflow.com/questions/3150626/making-a-footer-not-rise-above-the-bottom-of-the-screen-without-extraneous-markup in which both myself and the original asker, Jason Christa, came up with workable solutions. The link had the particular requirement of not using a containing div but I think the concepts from it should prove useful in your application.

Scott
I have reviewed this post a bit as well as the example link provided in one of the answers and haven't been able to get this to really work for my situation.
Slevin