SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict GonzaloGM's Avatar
    Join Date
    May 2007
    Location
    Rosario, Argentina
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fit container's height?

    I'm sorry I have to make another thread, but I have a problem. While making a website I had to resolve the following situation:

    I have a container div which has two divs inside it. Those two divs are columns. The container div has no fixed height (only fixed width). The two columns have no fixed height but they do have a fixed width. The left column has some content and that column expands according to the content. The right column has a background color (and in the future a centered background image). I want the second column (the one on the right) to have the same height as the left one (which would be the container div's height) but I have no idea of how to do that. I tried setting height:100% to the right column and min-height:100% but it didn't work.

    Here's a simple example of the problem I have:

    http://www.krugonn.com/misc/test/div2/test.php

    In this example I could set the container's background color to the same color as the right column to simulate what I want, but that's not want I want to do.

    Thanks in advance.

    PS: I'm sorry if this doesn't go on this subforum but I wasn't sure where to put it.

  2. #2
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheat - check out Faux columns

  3. #3
    SitePoint Addict GonzaloGM's Avatar
    Join Date
    May 2007
    Location
    Rosario, Argentina
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great, thanks Centauri. I guess it's pretty much the same as I did by changing the container's background color to the same that in the right column.


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
  •