Link to home
Create AccountLog in
Avatar of scm0sml
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?
Avatar of Luis Pérez
Luis Pérez
Flag of Spain image

Try with style:
position:absolute;bottom:0px;

Hope that helps.
Avatar of scm0sml
scm0sml

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.
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.
Avatar of scm0sml

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
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
It also worked in IE8, IE8 Compatibility mode, Safari, and Chrome.
Avatar of scm0sml

ASKER

shiver me timbers!! my hero!!

Not 100% sure why but its worked!!

Top man.