我想有有堆放在彼此的顶部像下面有两个按钮两行:将四个按钮与Bootstrap均匀堆叠在一起?
[button][button]
[button][button]
这些按钮需要在屏幕的中心,并均匀地拿起图片下方的空间。我非常接近下面的代码,但不能让它们正确居中。我将如何更改我的代码来完成此操作:
[ Image ]
[button][button]
[button][button]
另外我觉得我让这个过于复杂。是否有更简单的方法将按钮均匀地堆叠在中心?谢谢!
/*Four Button Set-up*/
.buttonAnswerLeft{
width: 25%;
max-width: 800px;
font-size: 25px;
display: inline-block;
text-align:center;
}
.buttonAnswerRight{
width: 25%;
max-width: 800px;
font-size: 25px;
display: inline-block;
text-align:center;
float: left;
}
<img class='image center-block' id='image6' src='http://mooxidesign.com/wp-content/uploads/2015/04/Online-Education.jpg'>
</div>
<div class="button-box col-lg-12 col-xs-12">
<button id='' type="button" class='buttonAnswerLeft noCollegeForSure buttonsQuestion6 btn btn-info '> Absolutely sure, I'm not going.</button>
<button id='' type="button" class='buttonAnswerRight noCollegeForSure buttonsQuestion6 btn btn-info '> Pretty sure I'm not going. </button>
</div>
<div class="button-box col-lg-12 col-xs-12">
<button id='' type="button" class='buttonAnswerLeft maybeCollege buttonsQuestion6 btn btn-info '> It's doubtful. </button>
<button id='' type="button" class='buttonAnswerRight maybeCollege buttonsQuestion6 btn btn-info '> It's a maybe. </button>
</div>
</div>
</div>
皮特这解决了一切!非常感谢您花时间做到这一点。这有很多答案,但正如你所说,没有一个是100%的解决方案。这个窍门!谢谢! – AndrewLeonardi
你应该为人们建立一种“买你一杯咖啡”的方法。 – AndrewLeonardi