0

これが私のフォームです

ご覧のとおり、情報の左側と右側(入力)の間には多くのスペースがあります。このスペースを制限するにはどうすればよいですか?

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

1 に答える 1

5

チェックボックスがcolspan=2になるように、セルのcolspanを変更します。これがないと、ラベル付きのチェックボックス全体が左側の列の内側に配置されるためです。変更後は両方の列に分散されるため、ラベルの付いた左側の列はそれほど広くする必要はありません。

<td colspan=2><input name="Agreement" type="checkbox" value="1"> I agree with the terms of service</td>
于 2012-07-22T19:32:03.487 に答える