我遇到了一个非常奇怪的错误(我认为),有一些关于2px
的按钮降低了搜索框。任何人都可以告诉我如何解决这个问题吗?如何对齐输入文字和搜索按钮?
#form {
text-align: center;
}
#Bar {
height: 35px;
width: 400px;
font-size: 20px;
}
#sea {
background-color: #ffffff;
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
border-radius: 0px;
height: 35px;
color: #000000;
font-family: Arial;
border-style: solid;
border-width: 1px;
font-size: 15px;
text-decoration: none;
border-color: #B9B9B9;
}
body {
margin: 0 auto;
font-family: Arial;
}
<html>
<head>
<link rel="stylesheet" href="test.css" />
</head>
<hr>
<form id="form">
<input id="Bar" name="Input" type="text" placeholder="Search for word or phrase"></input>
<button id="sea">Search</button>
<br>
<input type="radio" name="textOp" checked="checked">Highlight</input>
<input type="radio" name="textOp">Filter</input>
</form>
</script>
</html>
谢谢你解决我的错误。我不知道是自动关闭的。我不知道为什么我没有添加
标签。另外,为什么需要<!DOCTYPE html>?浏览器不应该知道它是来自文件上.html标记的HTML文档吗? – Hawkeye不客气,读这篇指的是doctype http://stackoverflow.com/questions/6076432/why-do-i-need-a-doctype-what-does-it-do – Stickers