Results 1 to 7 of 7

Thread: Liquid height divisions problem

  1. #1
    Join Date
    Apr 2006
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Liquid height divisions problem

    Hi -

    I have a simple problem that has been vexing me for weeks; I'm trying to get a container division to have a liquid height.

    I have a simple working example of webpage structured with 3 divisions. A fixed-height TOP division (gray), a variable-height MIDDLE division (blue) and a fixed-height BOTTOM division (yellow). For some reason I cannot get the variable-height MIDDLE division to expand with the content it contains.

    I have a simple example here: http://www.saratogawebsites.com/test/

    Any ideas where I'm going wrong?

    Thanks,

    Saratoga Sam

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    That is because the divisions that contain the text are absolutely positioned, which means they don't take up any space. You could position them relatively.

    Good luck!

  3. The Following User Says Thank You to Snookerman For This Useful Post:

    Saratoga Sam (03-02-2009)

  4. #3
    Join Date
    Apr 2006
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Ok - thanks, Snookerman.

    But how would I get these two divisions of text to align using relative positioning, so that they are displayed at the same position in the y-axis?

  5. #4
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    You can float them using float: left;. You will also have to set the parent container to overflow: hidden; to clear the float.

    Good luck!

  6. #5
    Join Date
    Jan 2006
    Location
    Derbyshire, UK
    Posts
    74
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default

    Is this the same problem...,

    Three columns side-by-side (left, middle & right divs that float:left) all within a containing div #wrapper.
    In IE #wrapper height expands with columns but in all other browsers it remains.

  7. #6
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Burgin, please post a link to your site and in the future, please start your own thread, even if you suspect you have the same issue. Now, you can ask a mod to move it for you.

  8. #7
    Join Date
    Apr 2006
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Snookerman, thanks. I will experiment with your suggestion.

    I'm not sure I understand why absolute positioned div's do not take up space.

    Do you know what the philosophy behind this is?

    Thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •