我有一个简单的引导弹出模式。现在当弹出窗口出现时,关闭x按钮位于中心,我想将关闭按钮x对齐到弹出窗口的右侧角落。我怎样才能做到这一点?*解决*如何对齐自举弹出模式中的关闭按钮
<div class="modal fade" id="checkNameSurvey-modal" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog">
<div class="loginmodal-container" id="checkNameSurveymodal-container">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 style="text-align:center"></h4><br>
<div>
<input type="text" class="form-control login-input" id="newSurveyName" onkeyup="if(event.keyCode==13)document.getElementById('checkName-button').click()">
<button type="button" class="btn btn-primary" id="checkName-button"></button>
</div>
</div>
</div>
</div>
不知道你的意思是关闭x按钮是“放置在中心”。它似乎在我的右上角:http://www.bootply.com/G1dhDkQyYU –
应用'display:inline-block; text-align-right;'它应该工作,但如果这是放在一个jsfiddle我可以测试其他东西:) – lucasnadalutti
我无法复制你的问题。 [我用这个小提琴来测试它。](https://jsfiddle.net/4castle/jmocnfus/2/)关闭按钮看起来像它已经在右上角。 – 4castle