auto expand div height

Posted by Geln on Stack Overflow See other posts from Stack Overflow or by Geln
Published on 2010-04-14T17:21:41Z Indexed on 2010/04/14 17:43 UTC
Read the original article Hit count: 372

Filed under:
|

alt text

<html><head><title>Test</title>
<style>
.main{width:600px;border:1px solid red; }
.main .left{background:lightblue; width:100px;clear:both; float:left;}
.main .right{margin-left:100px;background:lightyellow; }
</style>
    </head><body>
<div class="main">
    <div class="left">
    title
    </div>
    <div class="right">
        <div id="item">item</div>
        <div id="item">item</div>
        <div id="item">item</div>
        <div id="item">item</div>
        <div id="item">item</div>
        <div id="item">item</div>
        <div id="item">item</div>
    </div>
</div>
</body></html>

How to change the CSS to make the page display like the dialog shows?

PS,I think it's a way that to make the "left" div's height auto expand when the height of the "right" div or parent div expand, but I don't know how.

© Stack Overflow or respective owner

Related posts about css

Related posts about html