SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    Dublin
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question problems with containers

    Hi,

    I have 2 containers.

    The first container cotains data coming from a database, so the height of the container depends on how much data is retieved.

    The second container contains no data. How can I get the second container to match the dynamic height of the first container? I need to do this because they are side by side on the web page.

    Any ideas are welcome.

  2. #2
    The MacGyver of Design bronze trophy Johan Dahlström's Avatar
    Join Date
    Oct 2004
    Location
    Uppsala, Sweden
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is a common problem when layouting with divs. The most widespread solution is to simulate that the shorter container is as long as the tall one by using background-images. Take a look at the article below. That should give you a clue of how it's done.

    http://alistapart.com/articles/negativemargins/

  3. #3
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    SitePoint Zealot
    Join Date
    Apr 2004
    Location
    Chelsea, MA-USA
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    SitePoint Wizard Dean C's Avatar
    Join Date
    Mar 2003
    Location
    England, UK
    Posts
    2,906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should have an outer container to these two containers. Then on the outer container in your css put overflow:hidden;

    Then outer container will extend to the height of the two containers then instead of overlapping. Hopefully this is what you're trying to do I did get a sneaky suspicion you were looking for 100% height!


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
  •