Placing columns inside bootstrap modal
45,022
There is no row-md-*
in Bootstrap, but col-md-*
should work..
<div class="modal-body">
<div class="row">
<div class="col-md-6">
Left
</div>
<div class="col-md-6">
Right
</div>
</div>
</div>
Related videos on Youtube
Author by
Duncan Ogle
Updated on April 07, 2020Comments
-
Duncan Ogle about 4 years
I'm trying to get a Bootstrap model to have multiple columns inside it, however it does not appear to be working with my content appear vertically as opposed to in columns. My code is here:
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">Modal</h4> </div> <div class="modal-body"> <div class="row"> <div class="row-md-6"> Left </div> <div class="row-md-6"> Right </div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> </div> </div>
I've found a few things around that solved this issue with Bootstrap 2, but they don't work with Bootstrap 3. I've also tried changing the
row-md-6
tosm
,xs
etc, but no luck. Is it possible to do it in Bootstrap 3? Columns would be the most ideal thing for me, but should I avoid columns all together? -
Duncan Ogle about 10 yearsArghhh! I'm an idiot! Thanks haha, think its always good to get another person to look over code as you always miss things.
-
SophisticatedUndoing over 8 yearsEven I write this basic code for my model, I am getting two columns aligned vertically instead of horizontal scheme.Is there any common reason for this?