enter image description here我在模型页脚中添加按钮,但它没有排成行,而是进入下一行。
<div class="modal-footer">
<form method="post" action="admin_view">
<a type="submit" name="accepted" value="<?php echo $object['id'];?>" class="btn btn-success">Accepted Job</a>
</form>
<form method="post" action="reject_job">
<a type="submit" name="rejected" value="<?php echo $object['id'];?>" class="btn btn-danger">Rejected Job</a>
</form>
<button type="button" class="btn btn-default" data-dismiss="modal">close</button>
</div>
答案 0 :(得分:0)
在btn中使用“pull-left”类。或者,如果你想要正确,那么使用“拉右” 你想要更多帮助吗?转到此网址以供参考Bootstrap: change div order with pull-right, pull-left / 3 columns
<div class="modal-footer">
<form method="post" action="admin_view">
<a type="submit" name="accepted" value="<?php echo $object['id'];?>" class="btn btn-success pull-left">Accepted Job</a>
</form>
<form method="post" action="reject_job">
<a type="submit" name="rejected" value="<?php echo $object['id'];?>" class="btn btn-danger pull-left">Rejected Job</a>
</form>
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">close</button>
</div>
答案 1 :(得分:0)
试试这个
<div class="modal-footer">
<div class="col-md-4">
<form method="post" action="admin_view">
<a type="submit" name="accepted" value="<?php echo $object['id'];?>" class="btn btn-success">Accepted Job</a>
</form>
</div>
<div class="col-md-4">
<form method="post" action="reject_job">
<a type="submit" name="rejected" value="<?php echo $object['id'];?>" class="btn btn-danger">Rejected Job</a>
</form>
</div>
<div class="col-md-4">
<button type="button" class="btn btn-default" data-dismiss="modal">close</button>
</div>
</div>