
我有以下的html
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-body">
<table>
<tbody>
<tr>
<td>
<div class="span2 fileupload fileupload-new pull-left" data-provides="fileupload">
<div class="fileupload-preview thumbnail" style="width: 200px; height: 150px;"></div>
<div> <span class="btn btn-file"><span class="fileupload-new">Select image</span>
<span
class="fileupload-exists">Change</span>
<input type="file" />
</span> <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
</div>
</div>
</td>
<td>
<div class="progress">
<div class="bar" style="width: 60%;"></div>
</div>
<button class="btn btn-mini" type="button">Upload</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>发布于 2013-02-20 00:41:28
编辑:这只是一个纯粹的CSS解决方案的,看看下面的答案,如果你想要更多的引导。
您可以使用一点css将模态主体分成两个部分,就像做两列的页面布局一样简单。
...
<div class="modal-body>
<div class="first-column">
<!-- Your first column here -->
</div>
<div class="second-column">
<!-- Your second column here -->
</div>
</div>
...和CSS
.first-column {
width: 40%;
float: left;
}
.second-column {
width: 40%;
float: right;
}没有必要在模型中使用网格系统,如果你试图用跨度来拟合它,结果可能会更糟。
发布于 2013-10-27 14:13:23
如果您使用的是bootstrap 3.0,只需在此处添加一个答案。在bootstrap 3.0中,row-fluid被row取代,span被col-md (完全更改的日志here)取代。
所以爱德华多·格拉杰达的答案是
<div class="modal-body row">
<div class="col-md-6">
<!-- Your first column here -->
</div>
<div class="col-md-6">
<!-- Your second column here -->
</div>
</div>发布于 2013-06-10 08:49:43
我只想补充说,我使用Bootstrap提供的CSS成功做到了这一点。以下代码适用于我:
<div class="modal-body row-fluid">
<div class="span6">
<!-- Your first column here -->
</div>
<div class="span6">
<!-- Your second column here -->
</div>
</div>https://stackoverflow.com/questions/14961932
复制相似问题