HTML按钮和文本字段

HTML按钮和文本字段,html,css,forms,button,Html,Css,Forms,Button,我正在尝试进行HTML聊天,但当我尝试在文本字段旁边放置提交按钮时, 按钮位置始终在文本字段位置下方几个像素处 <center> <input name="msg" id="inputField" type="text"> <button id="submitBtn" onclick="javascript:sendChatMsg" value="Send"> Send </button> </center> 高度和宽度有数

我正在尝试进行HTML聊天,但当我尝试在文本字段旁边放置提交按钮时, 按钮位置始终在文本字段位置下方几个像素处

<center>
<input name="msg" id="inputField" type="text">
<button id="submitBtn" onclick="javascript:sendChatMsg" value="Send">
     Send
</button>
</center>

高度和宽度有数字,但没有单位:

width:830;
height:50;
更改为:

width:830px;
height:50px;
添加到文本字段

vertical-align: top;
尝试加载项输入字段

CSS


或更改垂直对齐:底部;在垂直对齐:顶部;结束戴尔利润上限:5px;边缘顶部:9px

该元素在1954年被弃用。改用CSS。1954年……有疑问!:-为什么这不是一个答案?按钮具有有效高度时,输入字段没有有效高度。这就是为什么一个是50像素高,而另一个不是。他在说为什么按钮会掉下来
vertical-align: top;
webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  vertical-align:bottom;
#inputField{
  border: none;
  outline:none;
width:830;
height:50px;
font-size:20px;
color:#FFFFFF;
background-color:#000000;
border-width:1px;
border-style:solid;
border-color:#FFFFFF;
margin-top:5px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  vertical-align:bottom;
    }