gpt4 book ai didi

javascript - 限制 td 之间的空间

转载 作者:太空宇宙 更新时间:2023-11-03 20:54:56 26 4
gpt4 key购买 nike

这是我的 form

如您所见,信息左侧和右侧(输入)之间有很多空间。我如何限制这个空间?

<html><head><title>Create a League</title></head>

<body>

<center><h1>Create a League</h1></center>

<form action="" method="POST">

<table cellpadding="0" border="0">
<tr><td >League Name </td>
<td> <input name="LeagueName" type="text"> </td>
</tr>
<tr><td>Number of Members </td>
<td><input name="Members" type="text"></td>
</tr>
<tr><td>League Password </td>
<td><input name="LeaguePassword" type="password"></td>
</tr>
<tr>
<td colspan=><input name="Agreement" type="checkbox" value="1"> I agree with the terms of service</td>
</tr>
<tr>
<td colspan=""><input type="submit" value="Register" name="action">
<input type="reset" value="Reset"></td>
</tr>
</table>
</form>


</body>
</html>

最佳答案

将复选框所在单元格的 colspan 修改为 colspan=2,因为如果没有它,带有标签的整个复选框将放置在左列内。更改后,它将分布在两列中,因此带有标签的左侧不必那么宽。

<td colspan=2><input name="Agreement" type="checkbox" value="1"> I agree with the terms of service</td>

关于javascript - 限制 td 之间的空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11603344/

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