我相信这是我的一个完整的监督,但我有一个按钮,我想一个输入框的直接权利,我的HTML是:提交按钮不合作
<input type="text" name="q" id="search" />
<input type="submit" name="submit" id="submit" value="Go!" />
和css是:
#main input {
margin: 30px auto auto 130px ;
positiom: absolute;
font-size: 18px;
background: #fff;
border: 3px;
padding: 6px;
z-index: 3;
}
#search {
float: left;
width: 550px;
}
#submit {
width: 60px;
}
#submit::-moz-focus-inner {
border: 0;
padding: 0;
}
The Go!按钮直接位于提交框左侧的下方,任何类型的边距调整都是徒劳的,它只是停留在那里。还尝试使位置绝对和按钮重叠。
The Go!按钮将无法正确定位 - 它应该位于我的输入框的右侧,但它会挂在它下面。
我怎样才能让它直接定位到我的输入框?
感谢您的帮助!
编辑:
html{
background: url(images/bg5.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#main{
width: 875px;
height: 350px;
background: url(images/form3.png) 0 0 no-repeat;
margin:250px auto;
z-index: 1;
}
#main form {
width: 850px;
height: 191px;
background: url(images/logo3.png) 0 0 no-repeat;
margin: -165px auto auto -90px;
position: absolute;
z-index: 2;
}
#text {
font-size: 30px;
color: #ffffff;
font-family: parisjetaime;
margin: 189px auto auto 130px ;
line-height: 30px;
}
#main input {
margin: 30px auto auto 130px ;
font-size: 18px;
background: #fff;
border: 3px;
padding: 6px;
z-index: 3;
}
#search {
width: 550px;
}
#submit {
width: 60px;
float: right;
}
#submit::-moz-focus-inner {
border: 0;
padding: 0;
}
从描述中不清楚实际问题是什么。 – Oded 2011-04-06 21:23:25
抱歉 - 去!按钮将无法正确定位 - 它应该位于我的输入框的右侧,但它会挂在它下面。 – Sapp 2011-04-06 21:27:17
看起来你已经有了答案,但是请注意,你在#main输入下拼写错误的“位置” - 这可能不会帮助任何东西;) – kjl 2011-04-06 21:30:27