1
<div id="parent">
    <div id="leftColumn"></div>
    <div id="rightColumn"></div>
</div>
  1. When the height of the 'leftColumn' and the 'rightColumn' less than screen height, the 'leftColumn' and 'rightColumn' should have the same height as screen.
  2. If the height of the 'leftColumn' and the 'rightColumn' longer than screen height, the 'parent' div should expand automatically.

Is there anyone know how to solve this problem? Thanks in advance.

Acubi
  • 2,793
  • 11
  • 41
  • 54
  • 1
    Can you please show us your current CSS for these –  Aug 23 '11 at 08:34
  • Maybe you should try the [faux columns technique](http://www.alistapart.com/articles/fauxcolumns/). – mAu Aug 23 '11 at 08:39

2 Answers2

1

left and right columns:

min-height:100%;

parent:

min-height:100%;
height:auto;

That should work ;)

Quentin Hayot
  • 7,786
  • 6
  • 45
  • 62
0

Even if the parent DIV encircle childs, if childs are carry out from the normal flow with CSS, the parent height DIV will be one EM. You can verify that by changing the background-color of your parent DIV and give to child properties like position: relative or float: left keeping parent DIV in the normal flow

bobKado
  • 13
  • 4