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
to sm
, 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?
modal-header class is used to define the style for the header of the modal. The <button> inside the header has a data-dismiss="modal" attribute which closes the modal if you click on it. The . close class styles the close button, and the . modal-title class styles the header with a proper line-height.
Column wrapping If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.
When the Button is clicked, the HTML DIV is referenced using jQuery and its modal function is called along with properties data-backdrop: "static" and data-keyboard: false which disables the closing of the Bootstrap Modal Popup when clicked outside.
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>
http://www.bootply.com/130819
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With