• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

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?
0
scm0sml
Asked:
scm0sml
  • 3
  • 3
1 Solution
 
Luis PérezSoftware Architect in .NetCommented:
Try with style:
position:absolute;bottom:0px;

Hope that helps.
0
 
scm0smlAuthor Commented:
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.
0
 
Tom BeckCommented:
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.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
scm0smlAuthor Commented:
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?!
0
 
Tom BeckCommented:
I don't know why this worked, but try this (it worked in Firefox):

1.) Remove styles from the footer div:

#footer {
    background-color: #000000;
    height: 93px;
    width: 100%;
}

2.) Remove the height from the "right" div:

#right {
    float: left;
    width: 729px;
}
0
 
Tom BeckCommented:
It also worked in IE8, IE8 Compatibility mode, Safari, and Chrome.
0
 
scm0smlAuthor Commented:
shiver me timbers!! my hero!!

Not 100% sure why but its worked!!

Top man.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now