gpt4 book ai didi

html - 在底部对齐文本框和文本区域 id

转载 作者:太空宇宙 更新时间:2023-11-04 14:55:59 26 4
gpt4 key购买 nike

html:

<table>
<tr>
<td>
<div style="position: absolute; bottom:0px; ">Other <input type="text" name="otherlocation"></div>
</td>
<td>
<div>Other <input type="textarea" name="locationdescription"></div>
</td>
</tr>
</table>

文本区域的高度:240px 和宽度:240px。现在 <td>的高度增加到 textarea 的高度,但我需要将文本输入框对齐到 <td> 的底部.

上面的样式不行。

最佳答案

我不确定我是否正确理解了您的意思。但我猜你需要在文本“其他”下方显示文本框。如果是这种情况,请尝试以下操作:

<table>
<tr>
<td>
<div style="width:200px;height:300px; position:relative">
<div style="position: absolute; bottom:0px;">Other <input type="text" name="otherlocation"></div>
</div>
</td>
<td>
<div style="width:200px;height:300px; position:relative">
<div style="position: absolute; bottom:0px;">Other <input type="textarea" name="locationdescription"/></div>
</div>
</td>
</tr>
</table>

Fiddle

关于html - 在底部对齐文本框和文本区域 id <td>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16975910/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com