4 replies [Last post]
vortexrage
Offline
newbie
Last seen: 13 years 46 weeks ago
Joined: 2006-10-13
Posts: 6
Points: 0

Hey, It's me again... I've been struggling most of the day with this and can't really seem to fix it without upsetting something else~.

I'm working on my webpage and I've been having troubles with a min-height property for a div.

I have a div called #footersides and another one inside this one called #container

if footersides is set to 100%height, the footer of the page behaves as it should, but the height of this div will be fixed at 100% of the height and not increase it's size with the content going behond the screen.
If i set it to min-height:100% the #footersides works as it should, but the footer climbs up on the page.

I have an example at:
visualrebirth.com/assets/html/about.htm

Any ideas? I'm just about to remove this div and do the website without it...

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 8 years 6 days ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

You need to show more of

You need to show more of your html. (oops, missed the link; you need to say what you want to happen - its not obvious to me at least)

Percentage min-height will only work if its parent has a specified height. If the parent's use min-height too, the min-height on the child will be undefined.

vortexrage
Offline
newbie
Last seen: 13 years 46 weeks ago
Joined: 2006-10-13
Posts: 6
Points: 0

Well what i want is for the

Well what i want is for the footer to be at the bottom of the page if the content is smaller than the viewport and for it to be at the bottom of the page if it is bigger than the viewport. Now the catch is, I want a div with the green sides of the footer as a background to be always arround the footer at the bottom of the page as well, which I can do in internet explorer and opera, but not firefox.

This is, because as you say the div's parent uses either min-height or height for its size, but both properties set at 100% mess it up and displace either the footer or it's containing div. I just don't know if it's possible to use min-height is this situation or if I'm just doing it wrong.

Kinda messy explanation, I'm sorry.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 5 years 49 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

If you're after footer at

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

vortexrage
Offline
newbie
Last seen: 13 years 46 weeks ago
Joined: 2006-10-13
Posts: 6
Points: 0

Thank you all, i think I've

Thank you all, i think I've found the problem, I had a misplaced position:relative, so the footer would absolutly position itself within that div instead of the one I wanted.

Thank you again!