Bootstrap Responsive Modal

 

.col-md ,.col-sm,.col-lg,.col-xs classes are used here.Resize the browser to see the effect of used classes and try to analyse.

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Bootstrap Input Example</title> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> </head> <body> <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#gridModal"> Open Modal </button> <div class="modal fade" id="gridModal" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title">Modal title</h4> </div> <div class="modal-body"> <div class="row"> <div class="col-md-6 col-md-offset-6">.col-md-6 .col-md-offset-6</div> </div> <div class="row"> <div class="col-md-4">.col-md-4</div> <div class="col-md-4">.col-md-4</div> <div class="col-md-4">.col-md-4</div> </div> <div class="row"> <div class="col-md-6">.col-md-6</div> <div class="col-md-6">.col-md-6</div> </div> <div class="row"> <div class="col-lg-12 hidden-md hidden-xs hidden-sm"> .col-lg-12 </div> <div class="col-md-12 hidden-sm hidden-xs hidden-lg"> .col-md-12 </div> <div class="col-xs-12 hidden-md hidden-sm hidden-lg"> .col-xs-12 </div> <div class="col-sm-12 hidden-md hidden-xs hidden-lg"> .col-sm-12 </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><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div> </div> </div> <!-- /.modal --> </body> </html>
Output