输入单步降低

时间:2013-01-28 12:04:28

标签: php css

我的注册表格有一个降级问题,我已经尝试了我可以在谷歌上找到的所有内容,但没有任何作用。

我的DOB部分被分成3个不同的输入框,我试图在左边的左侧放置正确的列,但是只要我在其上放置任何样式,年份部分就会逐步降低。

我尝试了很多不同的变化;浮动,显示,没有任何作用。此外,我已经添加了额外的盒子,它总是在前两个盒子之后发生降压。

当我尝试设置样式时,请注意年份下移:

enter image description here

无论顺序如何,请务必在2之后退出:

enter image description here

HTML code:

<div id="regforms">
    <form method="post" action="register.php" name="registerform" id="registerform">
        <fieldset2>
            <div id="regforms1">
                <label for="username"></label><input type="text" name="username" id="username" placeholder="Username"/><br />
                <label for="password"></label><input type="password" name="password" id="password" placeholder="Password"/><br />
                <label for="email"></label><input type="text" name="email" id="email" placeholder="Email"/><br />
                <input type="submit" name="register" id="login" value="Register" />
            </div>
            <div id="regforms2">
                <label for="name"></label><input type="text" name="name" id="name" placeholder="Name"/><br />
                <div id="dob">
                    <label for="dobm"><input type="text" name="month" id="month" placeholder="MM"/><br />
                    <label for="dobd"><input type="text" name="day" id="day" placeholder="DD"/><br />
                    <label for="dobd"><input type="text" name="day" id="day" placeholder="DD"/><br />
                    <label for="dobd"><input type="text" name="day" id="day" placeholder="DD"/><br />
                    <label for="doby"><input type="text" name="year" id="year" placeholder="YYYY"/><br />
                </div>
            </div>
        </fieldset3>
    </form>
 </div>

CSS:

#regforms {
margin-top:200px;
border: 0; 
display:block;
width:600px;
}

#regforms1 {
padding-right:25px;
width:275px;
float:left;
}

#regforms2 {
width:275px;
float:right;
}

#dob {
}

#month{
width:5%;
margin-right:5px;
}

#day{
width:10%;
margin-right:5px;
}

#year{
width:10%;
margin-right:5px;
}

1 个答案:

答案 0 :(得分:0)

正如Aligarian所说,您只需删除<br/>标记,但您似乎没有关闭DOB字段中的<label>标记;你应该关闭它们。

相关问题