我有一个字段集(左)div(右)对。fieldset 的内容是固定的,但它具有 hide()/show() 元素,例如 [Next] 按钮。当这些控件切换时,它会改变 fieldset 控件的高度。我想用右侧的 div 跟随这个高度。如何?这不是调整大小事件...
-<fieldset>-----------------------<div>-----
| | |
| | |
| | |
| | |
| | |
| |---------|
| [Next] |
----------------------------------
HTML:
<div class="attach">
<p>something</p>
</div>
<fieldset class="left">
<p>lotsa content</p>
<p class="message">
<button id="n" type="button">Next ></button>
<span></span>
</p>
</fieldset>
CSS:
body {
width: 720px;
}
fieldset.left {
border-width: 1px 1px 1px 1px;
}
div.attach {
position: relative;
float: right;
border: thin solid LightGray;
right: 1px;
width: 120px;
height: 242px;
}