absolute positioned div container wont resize

Discussion in 'CSS' started by kal123, Jan 2, 2008.

  1. #1
    Hi

    I have a div that contains my site content. The container is style
    with position:absolute;width:800px;background-color:blue;

    the content can form multiple divs each being uniquly positioned. Also
    some will have lots of text and so can scroll down the page.

    I have two issues:

    1) How do i get the footer to always be at the bottom of the content div?

    2) How do I get the container div to stretch so that the contents all appear in the container?

    <div id="container">
    <div id="header">my header</div>
    <div id="content1">some absolute positioned content</div>
    <div id="content2">some absolute positioned content</div>
    <div id="footer">thanks for visiting</div>
    </div>

    The way I have got it to work at the moment is to make the container height: really big and then to absolute position the footer. but this looks silly.
    ideally I would want the container to have a minimum height and then to stretch.

    Thanks for any and all help

    K
     
    kal123, Jan 2, 2008 IP
  2. kal123

    kal123 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Addendum:

    I have managed to get the footer to go at the bottom of the content by:

    clear:both;
     
    kal123, Jan 2, 2008 IP