表内的CSS问题试图让div增加td的高度



我正在尝试获得以下段落的动态高度。

 <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部分,即使我为divp设置了宽度。我不想让pdivtd部分上出现。

有办法让它工作吗?

<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>

只能通过删除position:absolute;或使用JavaScript。

使<div>绝对定位将其从正常流程中移除。

最新更新