Grow your CSS skills. Land your dream job.

css height property

  • # March 24, 2009 at 1:31 am

    I am coding a layout right now and I am having trouble with the footer. My content is a fixed height and so I wanted my footer to be 100% of the remaining page. But when I added height: 100% to my footer, I found that it doesn’t work. Does anyone know why and have a solution for this? I have a repeating background image that I need to fill the space and I don’t want white space below my footer. That’s why I need it to be 100%

    # March 24, 2009 at 2:05 am

    I’m sure there is a better way, but this is all my brain can come up with right now. Works in Safari 4 and FF3, but undoubtedly fails in IE6 (untested):

    Code:
    < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    Lorem
    asldjflsadfjkld


    # March 24, 2009 at 2:13 am

    well i read that the reason height: 100% doesn’t usually work is because it needs a parent container with a height set. so the idea was to set the body to a height Of 100% then the footer would have a container to go off of, but it’s not working for me.

    # March 24, 2009 at 3:35 am

    If you read through what I provided, that’s exactly what I did.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".