I have two divs placed inside a larger div. Each one of these two divs contains dynamically generated content and thus their heights vary, so I cannot know which one of the two will be taller. The parent div they are placed in has a 1px border and I would like to have 1px line between these divs as well, so that the line extends all the way down to the bottom of the parent div which adjusts itself based on the heights of the child divs. This is much easier to understand in the following picture:

I have tried setting the child divs to a height of 100%, but that does not seem to be working. How can I accomplish this effect? (This also needs to work in IE6)
Well, this is relatively easy, if all you want is a single border extending to the full height of the tallest element (in this case the tallest
div), albeit my solution doesn’t really address the potential equal heights issue (if you wanted thebackground-colorof eachdivto extend to the full-height of the tallest element. It does, though, satisfy your request for the full-height single border:JS Bin Demo.
Edited to address my misunderstanding/mis-reading of the question.
This approach is kind of a hack, but is achievable using the same mark-up as in the previous demo, but more complex CSS:
Demo at JS Bin.
This won’t be cross-browser friendly, though, IE (for certain) is likely to have problems with, at least, the
:last-childpseudo-selector, so a JavaScript solution might be better for you in this instance. Although there is a more simple option to wrap the innerdivs (in this case the#leftand#rightdivs) in another div:Which can be used with the css:
Demo at JS Bin
But, while that’s more cross-browser friendly, it does start a descent into the madness that is divitis.