gpt4 book ai didi

css - 在模式中添加边距 Bootstrap 3 表

转载 作者:太空宇宙 更新时间:2023-11-04 02:44:47 26 4
gpt4 key购买 nike

我想在表格和模态之间添加一些空间。该表位于模式弹出窗口内,但我不知道如何构建空间。该表看起来很糟糕,这清楚地表明了糟糕的网页设计技巧。

添加类

.table-responsive

..没有帮助。

这就是它的样子,这是模态和表格的代码。

enter image description here

<div id="modalUserViewEdits" class="modal-block modal-block-lg mfp-hide">
<section class="panel">
<header class="panel-heading">
<h2 class="panel-title">User</h2>
</header>

<div class="alert alert-message hide">
<!--User message alert popup-->
</div>
<div class="form-data">
<form id="form_UserEdits" class="form-horizontal form-userEditsDetails">
<div class="panel-body">
<div class="form-group">
<label class="control-label col-sm-3">
Username
<span class="required">*</span>
</label>
<div class="col-sm-9">
<input class="form-control" id="userId_modalUserViewEdits" type="hidden" name="id" value="0" />
<input class="form-control" id="userAction_modalUserViewEdits" type="hidden" name="action" value="active"/>
<input class="form-control" id="userOperation_modalUserViewEdits" type="hidden" name="operation" />
<input class="form-control" id="userName_modalUserViewEdits" type="text" placeholder="Username" name="userName" disabled />
</div>
</div>
</div>
</form>
<div id="divDynamicTable" class="form-data table-responsive">
<table class="table table-bordered table-striped mb-none" id="table_viewUserChanges" data-swf-path="lookandfeel/assets/vendor/jquery-datatables/extras/TableTools/swf/copy_csv_xls_pdf.swf">
<thead>
<tr>
<th>Field</th>
<th>Old Value</th>
<th>New Value</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<footer class="panel-footer">
<div class="row">
<div class="col-md-12 text-right">
<button type="button" id="btnApproveUserEdit" class="btn btn-success" data-name='approve'>Approve</button>
<button type="button" id="btnDeclineUserEdit" class="btn btn-danger" data-name='decline'>Decline</button>
<button type="button" class="btn btn-default modal-dismiss">Cancel</button>
</div>
</div>
</footer>
</div>
</section>

请帮忙

最佳答案

container-fluid 类将表格包裹在 div

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"/>
<div id="modalUserViewEdits" class="modal-block modal-block-lg mfp-hide">
<section class="panel">
<header class="panel-heading">
<h2 class="panel-title">User</h2>
</header>

<div class="alert alert-message hide">
<!--User message alert popup-->
</div>
<div class="form-data">
<form id="form_UserEdits" class="form-horizontal form-userEditsDetails">
<div class="panel-body">
<div class="form-group">
<label class="control-label col-sm-3">
Username
<span class="required">*</span>
</label>
<div class="col-sm-9">
<input class="form-control" id="userId_modalUserViewEdits" type="hidden" name="id" value="0" />
<input class="form-control" id="userAction_modalUserViewEdits" type="hidden" name="action" value="active"/>
<input class="form-control" id="userOperation_modalUserViewEdits" type="hidden" name="operation" />
<input class="form-control" id="userName_modalUserViewEdits" type="text" placeholder="Username" name="userName" disabled />
</div>
</div>
</div>
</form>
<div id="divDynamicTable" class="form-data table-responsive">
<div class=container-fluid>
<table class="table table-bordered table-striped mb-none" id="table_viewUserChanges" data-swf-path="lookandfeel/assets/vendor/jquery-datatables/extras/TableTools/swf/copy_csv_xls_pdf.swf">
<thead>
<tr>
<th>Field</th>
<th>Old Value</th>
<th>New Value</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<footer class="panel-footer">
<div class="row">
<div class="col-md-12 text-right">
<button type="button" id="btnApproveUserEdit" class="btn btn-success" data-name='approve'>Approve</button>
<button type="button" id="btnDeclineUserEdit" class="btn btn-danger" data-name='decline'>Decline</button>
<button type="button" class="btn btn-default modal-dismiss">Cancel</button>
</div>
</div>
</footer>
</div>
</section>

关于css - 在模式中添加边距 Bootstrap 3 表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34035168/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com