将按钮输入中心和另一个按钮放在同一条线上

时间:2016-08-03 17:53:37

标签: html

我想把go-page按钮和输入中心和导出按钮放在同一行,它不能在下面工作

  

<div> <P style="float: center"> <input type="text" id="page-dir" name="page-dir" maxlength="6" size="4" autocomplete="on" onkeydown="if (event.keyCode == 13) document.getElementById('go-page').click()"/> <button style="float: center" id="go-page" onClick="goPage()">go to page</button> </P> <P style="float: right"> <button id="export" onclick="export()">export</button> </P> </div>

1 个答案:

答案 0 :(得分:0)

&#13;
&#13;
java.lang.class<Cls>
&#13;
.container {
  display:block;
  text-align:center;
  width:500px;/*you can use percentage*/
  position:relative;
  border:1px solid #ff4500;
}
.cont-one {
   display:inline-block;
   max-width:150px;
  border:1px solid #000;
}
#page-dir{
  width:50px;
}
.cont-two{
  position:absolute;
  display:inline-block;
  width:50px;
  float:right;
  border:1px solid #000;
  left:450px;
}
&#13;
&#13;
&#13;