scm0sml
asked on
silly issue with div position
Hi,
One of the more pleasant views for you today I'm sure but if you could take a look at this site which I have just started developing:
http://wsp-sandbox1.co.uk/
For the life of me I can't see why the footer div isn't displaying at the bottom of the site, I've been looking at it too long so am not seeing things clearly hence need a fresh pair of eyes.
I've put a large red div in just so you can see what is going on, the black footer div should be displaying under neath the red div.
Anyone see what is going on?
One of the more pleasant views for you today I'm sure but if you could take a look at this site which I have just started developing:
http://wsp-sandbox1.co.uk/
For the life of me I can't see why the footer div isn't displaying at the bottom of the site, I've been looking at it too long so am not seeing things clearly hence need a fresh pair of eyes.
I've put a large red div in just so you can see what is going on, the black footer div should be displaying under neath the red div.
Anyone see what is going on?
ASKER
nah i had already tried that.
just uploaded for you to see the results.
It does move it down slightly but not to where i would expect it to be.
just uploaded for you to see the results.
It does move it down slightly but not to where i would expect it to be.
It's because you are not specifying a height for your "main_content" div or for either the "left" or "right" div. You have a min-height for "main_content" of 300px and that is determining the position of the "footer" div. All other content inside the "main_content" div is just over flowing that 300px height.
For example, take away the position:absolute, bottom:0, and margin-top:50px from the "footer" div and change the height of the "right" div from 182px to 1160px and you will get close to what you want, although that may not be optimal.
For example, take away the position:absolute, bottom:0, and margin-top:50px from the "footer" div and change the height of the "right" div from 182px to 1160px and you will get close to what you want, although that may not be optimal.
ASKER
The problem then though is that I don't want any of it to be a given height, it just needs to grow with the content?!
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
It also worked in IE8, IE8 Compatibility mode, Safari, and Chrome.
ASKER
shiver me timbers!! my hero!!
Not 100% sure why but its worked!!
Top man.
Not 100% sure why but its worked!!
Top man.
position:absolute;bottom:0
Hope that helps.