コンテナ内のdivをBootstrapと揃えるのに少し問題があります。コンテナ内にdivが表示されるようにするには、幅が100%の場合
私がしようとしているのは、divをコンテナの幅の内側に広げることです。
これはコンテナの左側にありますが、右側にはありません。オフスクリーンになります。
HTML:
<!-- Image With Action Section -->
<section class="special_section">
<div class="container-fluid" style="max-height: 25%">
<div class="row">
<div class="col-sm-12">
<div class="caption-2">
<img src="background-image-url" class="img-full-width img-responsive" alt="" />
<div class="container">
<div class="action-footer">
<div class="col-sm-10">
<h4 class="caption-text">Title</h4>
</div>
<div class="col-sm-2">
Link
</div>
</div>
<div class="caption">
<h4>Title</h4>
<p>Content</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
CSS:
.caption-2 .action-footer {
margin: -1px 0 0 0;
padding: 10px;
font-size: 15px;
}
@media (min-width:500px) {
.caption-2 .action-footer {
margin:0;
position: absolute;
bottom: 0;
height: 10%;
width: 100%;
}
}
.action-footer .col-md-12 {
margin-top: -10px;
}
.action-footer
divが、私は親コンテナ内の100%の幅である必要は1です。代わりに、それはあまりにも多くの幅を取得します。
があまりにも –
@SahilDhirはポスト – Chris