以下HTML生成未对齐的按钮,由于包装文本,中间按钮高于另外两个按钮。我怎样才能让他们对齐?HTML按钮垂直对齐
<html>
<head>
<title>Status</title>
<style type="text/css">
.btn {
background-color:red;
font:bold 14px Arial;
width:200;
height:100;
background-color:green;
}
</style>
</head>
<center>
<br>
<form>
<button type=button class=btn onClick="#">Button 1<br>None</button>
<button type=button class=btn onClick="#">Really Long Wrapped Button 2<br>None</button>
<button type=button class=btn onClick="#">Button 3<br>None</button>
</form>
</center>
</html>
所有3个按钮似乎在Chrome/Win7的要正确对齐我。你使用的是什么浏览器?你也错过了''button'属性的引号,不知道这是否是一个错字... –
与Mozilla的@DrydenLong(Chrome)相同的显示器 – Zword
Win7上的IE 11或FF 25.0.1都显示它们未对齐。我也只是试过Chrome 31,它也没有对齐,但不同。对于IE和FF,中间按钮向上移动,对于Chrome,中间按钮向下移动。 – user3108382