html - 应用溢出时div不会扩展到全宽:自动
问题描述
[在此处输入图片描述][1]目前我面临一个问题。我使用带有修复标题和滚动条到 div 行部分的 div 生成表。但问题是两个 div 都没有占据整个 50% 50% 的宽度。
我试过以下代码。但没有工作。
.brd2 {
height: auto;
max-height: 100px;
overflow: auto;
position: absolute;
width: 100%;
}
.back-clr {
background-color: red;
}
HTML PART
<div class="container">
<div class="row">
<div class="col-md-8">
<div style="display: table;width:100%">
<div style="display: table-row">
<div style="width:50%; display: table-cell;">
Test
</div>
<div style="width:50%; display: table-cell;">
test
</div>
</div>
<div class="brd2" style="display: table-row;">
<div class="content" style="width:50%; display: table-cell;">
<p>sdfds
fdsf</p>
<p>dsfds
fds</p>
<p> fds
fsf
dsf</p>
<p>sdfds
fdsf</p>
<p>dsfds
fds</p>
<p> fds
fsf
dsf</p>
</div>
<div class="content back-clr" style="width:50%;display: table-cell;">
this is second div
</div>
</div>
</div>
</div>
</div>
</div>
解决方案
推荐阅读
- mongodb - 使用 MongoRepository 进行排序的 Spring Mongo 分页
- java - 未收到实时开发者通知
- deployment - 步行骨架的强制性步骤是什么?
- scala - 使用 zipWithIndex 对列表项进行分组
- vb.net - 我应该在 vb.net 中使用什么来代替 Oftype?
- ajax - 将 AJAX 分页添加到自定义帖子类型
- hybris - 如何在hybris.中创建订单级促销?
- javascript - 在 styled-components 中传递 window.onload 的函数
- swift - iphoneX 不调用 prefersStatusBarHidden
- ios - 应用商店应用的 Stripe 支付网关