简体   繁体   English

html表单的放置/对齐问题?

[英]Placement/Alignment issue with html form?

I have a form which looks like this 我有一个看起来像这样的表格

<form method=post action=index.php>

<table>
<tr>
        <td>Character Name</td>
        <td><input type="text" id="cname" name="cname"></input></td>
</tr>
<tr>
        <td>Race</td>
        <td><input type="text" id="race" name="race"></input></td>
</tr>
<tr>
        <td>Side</td>
        <td>  <input type="radio" name="side" value="1"> Good</input>
                  <input type="radio" name="side" value="2"> Bad</input>
        </td>
</tr>
<tr>
        <input id="step" name="step" type="hidden" value="5"></input>
        <input type="submit" value="submit"></input>
</tr>
</table>
</form>
</body>

All of the fileds inside the form are in a table. 表格中的所有文件都在一个表中。 The problem I am facing is that, the submit button, rather than coming at the bottom, is coming at the top. 我面临的问题是,提交按钮而不是位于底部,而是位于顶部。 在此处输入图片说明

Could somebody please point out what I am doing wrong? 有人可以指出我做错了吗?

<form method="post" action="index.php">
<table>
    <tr>
            <td>Character Name</td>
            <td><input type="text" id="cname" name="cname"/></td>
    </tr>
    <tr>
            <td>Race</td>
            <td><input type="text" id="race" name="race" /></td>
    </tr>
    <tr>
            <td>Side</td>
            <td>  
                <input type="radio" name="side" value="1" /> Good
                <input type="radio" name="side" value="2" /> Bad
            </td>
    </tr>
    <tr>
            <td>
                <input id="step" name="step" type="hidden" value="5" />
                <input type="submit" value="submit"/>
            </td>
    </tr>
</table>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM