【发布时间】:2021-04-27 07:02:05
【问题描述】:
我有两个延伸到我的容器的表单按钮。并逐行显示。有没有办法做到并排集中?
.submit1 {
background-color: #008CBA;
color: white;
text-align: center;
display: inline-block;
font-size: 18px;
border: none;
}
.submit2 {
background-color: #BA002D;
color: white;
text-align: center;
display: inline-block;
font-size: 18px;
border: none;
}
<html>
<body>
<form action="listingsPage.php" method="post">
<input type="submit" value="Express Interest" class="submit1">
</form>
<form action="listingsPage.php" method="post">
<input type="submit" value="Back to Listings" class="submit2">
</form>
</body>
</html>
【问题讨论】:
-
为什么会有两个不同的表格?这就是导致问题的原因......此外,您发布的代码不会产生您显示的输出(请使用编辑器工具栏中的图像图标重新发布)。