嗨,我有一个动态内容$search_results
,我正在尝试将它显示在<div>
. 但问题是高度<div>
没有根据内容大小增加。$search_results
是一个表格内容,如<table><tr><td>Values</td></tr></table>
这是代码。
<div style="background:#CCC;">
<div style="height:500px;width:1000px;margin:auto;padding-top:20px;">
<div style="width:200px;float:left; background:#666;color:white;">
<form name="SearchForm" action="" method="post">
<ul class="SearchList">
<li class="firstlist">Search</li>
<li>
<input type="text" class="text_medium" value="Keywords" name="KeywordsTextBox" onblur="if(this.value=='') this.value='Keywords'" onFocus="if(this.value =='Keywords' ) this.value=''" >
</li>
<li>
<select name="SearchValues" class="select_medium">
<option value="Search1">Search option 1</option>
<option value="Search1">Search option 2</option>
<option value="Search1">Search option 3</option>
<option value="Search1">Search option 4</option>
</select>
</li>
<input type='submit' name='SearchButton' class='Small_Button' value='Search'>
</li>
</ul>
</form>
</div>
<div style="width:800px;float:right; background:#C69;">
<form name="ResultForm" method="post" action="">
<?php
//$serachObj = new Search()
//$search_results = $serachObj->search();
echo $search_results;
?>
</form>
</div>
</div>
</div>
我已经尝试过style="min-height:500px;"
,但它不起作用。有什么建议么 ?。