我正试图通过以下段落获得动态高度。
<td>
<b>audio systems</b> <br>
<div style="position:absolute">
<p>Do you need services of a company that specialises in audio systems? With expertise in all areas of audio systems, AAVI is the best choice.</p>
</div>
</td>
我无法让td
动态增加div
标记内段落的高度。相反,即使我为td
和div
设置了宽度,它总是会越过p
部分。我不希望p
超过div
或td
部分。
我们有办法让这个工作吗?
答案 0 :(得分:0)
仅删除position:absolute;
或使用JavaScript。
使<div>
绝对定位removes it from the normal flow。
答案 1 :(得分:0)
<table>
<tr>
<td>
<b>audio systems</b> <br>
<div style="position:absolute">
<p>Do you need services of a company that specialises in audio systems? With expertise in all areas of audio systems, AAVI is the best choice.</p>
</div>
</td>
</tr>
</table>
适合我。