我正在努力将两个按钮对齐到行的中间,它就在表单中的一个表下面。
但是现在按钮的排列是垂直的。我如何使它们水平的和中间的。
添加供应商前缀后,在IE中查找Joykal Infotech参考
我想要正确地对齐他们的中间行和按钮应该在同一轴上。“返回登录”不应在多行中。
这是我试过的。
div.blueButton { /* Blue Button sized for submit */
position:relative;
margin:0;
background:transparent url('../images/btn_blue_back.gif') repeat-x;
color:white;
padding:0 4px 6px 4px;
text-align:center;
width:45px;
margin-left:520px;
}
div.blueButton_left {
background:transparent url('../images/btn_blue_l.gif') no-repeat left;
width:7px; height:22px;
position:absolute;
top:-2px; left:-2px;
}
div.blueButton_right {
background:transparent url('../images/btn_blue_r.gif') no-repeat right;
width:7px; height:22px;
position:absolute;
top:-2px; right:-3px;
}
a.button, .button {
width:auto;
padding:0; margin:0 0 0 0;
background:#005499;
font-size:11px; font-weight:bold; color:white; text-decoration:none;
cursor:pointer;
}<div>
<div class="blueButton">
<div class="blueButton_left"></div>
<div class="blueButton_right"></div>
<a href="" onclick="javascript:forgotUsername();return false;" class="button" onblur="javascript:f_setfocus();">Return to LogIn</a>
</div>
<div class="blueButton">
<div class="blueButton_left"></div>
<div class="blueButton_right"></div>
<a href="" onclick="javascript:forgotUsername();return false;" class="button" onblur="javascript:f_setfocus();">Continue</a>
</div>
</div>
发布于 2019-02-05 07:58:14
希望,这可能有助于我在按钮上面使用一个包装器,并提供了display: flex;和justify-content:center,还删除了给div.bluebutton的固定的width和margin。
并签出挠曲箱
更新-添加了供应商前缀
.wrap {
-webkit-display: flex;
-ms-display: flex;
-o-display: flex;
display: flex;
-webkit-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
justify-content: center;
}
div.blueButton {
/* Blue Button sized for submit */
position: relative;
margin: 0;
background: transparent url('../images/btn_blue_back.gif') repeat-x;
color: white;
padding: 0 4px 6px 4px;
text-align: center;
}
div.blueButton_left {
background: transparent url('../images/btn_blue_l.gif') no-repeat left;
width: 7px;
height: 22px;
position: absolute;
top: -2px;
left: -2px;
}
div.blueButton_right {
background: transparent url('../images/btn_blue_r.gif') no-repeat right;
width: 7px;
height: 22px;
position: absolute;
top: -2px;
right: -3px;
}
a.button,
.button {
width: auto;
padding: 0;
margin: 0 0 0 0;
background: #005499;
font-size: 11px;
font-weight: bold;
color: white;
text-decoration: none;
cursor: pointer;
}<div class="wrap">
<div class="blueButton">
<div class="blueButton_left"></div>
<div class="blueButton_right"></div>
<a href="" onclick="javascript:forgotUsername();return false;" class="button" onblur="javascript:f_setfocus();">Return to LogIn</a>
</div>
<div class="blueButton">
<div class="blueButton_left"></div>
<div class="blueButton_right"></div>
<a href="" onclick="javascript:forgotUsername();return false;" class="button" onblur="javascript:f_setfocus();">Continue</a>
</div>
</div>
发布于 2019-02-05 07:52:07
您可以使用引导程序并使用类窗体内联的div,并将两个按钮放置在div中。将div放在要显示的td中。
https://stackoverflow.com/questions/54529797
复制相似问题