2017-07-26 83 views
1

我想設置引導按鈕的權利和中心在一個警告框。按鈕向右拉,但不居中。這裏是我的Bootply:https://www.bootply.com/ORxGVJq0kG#Set Button Right&Center Bootstrap Alert Box

<div class="container-fluid"> 
    <div class="row"> 
    <div class="col-md-10 col-md-offset-1"> 
     <div class="alert alert-warning alert-dismissible fade in text-center" role="alert"><strong>Holy guacamole!</strong>Best check yo self, you're not looking too good.<button class="btn btn-primary pull-right" onclick="finish()" type="button">Finish</button></div> 
    </div> 
    </div> 
</div> 

回答

0

嘗試添加「文本中心」類的按鈕,將其添加到警報: style="line-height: 34px;"因爲按鈕具有34像素的高度,這意味着容器必須有一個行高也是34px。

+0

就是這樣,謝謝Sletheren !!! – Stephen

+0

然後您可以將它作爲選定的答案;) – Sletheren