我想有有堆放在彼此的頂部像下面有兩個按鈕兩行:將四個按鈕與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