Issue
I want to make a full width web page by Bootstrap 4.
I try to remove the original 15px padding of container-fluid, but it is still not working.
Details on jsfiddle. I marked the whole background as purple but u can see the jumbotron is not fully cover on the purple background.
<style>
.container-fluid {
padding: 0 !important;
}
</style>
Solution
Just use the p-0
and m-0
utility classes on the col and jumbotron (no extra CSS needed)...
<div class="container-fluid">
<div class="row">
<div class="col-md-12 p-0" style="background: purple;">
<div class="jumbotron m-0">
<h2>
Hello, world!
</h2>
<p>
This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.
</p>
<p>
<a class="btn btn-primary btn-large" href="#">Learn more</a>
</p>
</div>
</div>
</div>
</div>
https://www.codeply.com/go/iAQiRARTFR
Answered By - Zim
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.