Reputation: 23
I have a child div within the Bootstrap container div. How can the child div cover the full width of the parent ?
<div class="container">
<div class="row">
<div class="col-md-12 parent">
<div class="Full-Width"></div>
</div>
</div>
</div>
How to make this .Full-Width div width 100% of it's parent div ?
Upvotes: 2
Views: 6155
Reputation: 529
Bootstrap 4 you can use w-100 class.
<div class="container">
<div class="row">
<div class="col-md-12 parent">
<div class="w-100"></div>
</div>
</div>
</div>
Reference: [https://getbootstrap.com/docs/4.0/utilities/sizing/][1]
Upvotes: 2
Reputation: 229
Bootstrap gives padding
for some elements by default. So you have to add custom class to those elements and set padding
to 0.
Upvotes: 2
Reputation: 4773
CSS
.Full-Width {
display: block
}
This can also be done using:
.Full-Width {
width: 100%
}
Upvotes: 0
Reputation: 9439
Umm, you should probably re-word your question because as it sits right now,
this css: .Full-Width{width: 100%;}
answers your question.
Upvotes: 1