Reputation: 4029
I want to some cards on the bootstrap modal form.
In modal, I want cards in two columns for that I use the class "col-md-5"
.mycard.col-md-5
card contents
But class "col-md-5" add a property Float:left in the cards.
Due to which It will cards were showing outside of the modal popup
Any help will be appreciated.
Upvotes: 0
Views: 422
Reputation: 335
use class="row"
before col
<div class="row">
<div class="col-md-5">
</div>
<div class="col-md-5">
</div>
<div class="col-md-5">
</div>
<div class="col-md-5">
</div>
</div>
Upvotes: 0
Reputation: 4029
Thanks to @Chilll007
adding overflow:hidden
to the parent div
did the job.
Upvotes: 1
Reputation: 651
Please use clearfix to avoid showing outside of the modal popup
<div class="col-md-5">
</div>
<div class="col-md-5">
</div>
<div class="clearfix"></div>
please use clearfix this will help you
Upvotes: 0
Reputation: 2516
You should clear the floats below the 4 divs. Try this code.
<div class="mycard col-md-5">
content
</div>
<div class="mycard col-md-5">
content
</div>
<div class="mycard col-md-5">
content
</div>
<div class="mycard col-md-5">
content
</div>
<div class="clear"></div>
.clear {
clear: both;
}
Upvotes: 0