<table>
<tr>
<td><form name="profiel" action="profiel.php"><input class="button2" type="submit" value="Jens Boonen" /></form></td>
<td width="94%"><form name="zoeken" action="zoeken.php"><input type="submit" class="button2" value="Zoeken"> </form></td>
<td><form name="loguit" action="loguit.php"><input class="button2" type="submit" value="Log-Out" /></form></td>
</tr>
</table>
为什么按钮不在同一水平上?
根据要求的CSS:
.button2 {
background-color:black;
display:block;
line-height:200%;
text-transform: lowercase;
font-variant: small-caps;
font-size: 20px;
font-weight: 300;
text-decoration: none;
color: white;
margin:0.5%;
border:1px solid white;
}
这3个按钮均为“ button2”,“ zoeken”和“ log out”处于同一级别(注销未在图片中显示),但名称栏(在本例中为Jens Boonen)没有
最佳答案
删除margin: 0.5%
,第二个输入的末尾似乎缺少/
。
查看此JSFiddle。
关于html - 为什么按钮不在同一级别?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/21990182/