0

Hello I'm trying to display a modal splited in two parts, in the first one I'm trying to put an image, and in the other one I want to write N number of p tags. I thought using something like this:

<div class="row">
   <div class="col-md-6">
         Image
   </div>
   <div class="col-md-6">
          <p> tags
   </div>
</div>

But this doesnt works at all... What I exactly wants is something like in this picture:enter image description here

What can I do to get something like the above image? or should I use a table to do it?

PD. I'm using Bootstrap 3.3.7 and CSS.

User1899289003
  • 850
  • 2
  • 21
  • 40
  • Just use the grid inside the modal [like this question](http://stackoverflow.com/questions/24204315/bootstrap-modal-dialog-can-the-grid-system-be-used-within-a-modal-context) Also, you should post the code you've tried – Carol Skelly Feb 03 '17 at 17:01
  • @ZimSystem Sounds like that answer can solve my problem! And thats all the code I have at the moment. – User1899289003 Feb 03 '17 at 17:05

1 Answers1

1

You could do something like this.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <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" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        <div class="media">
          <div class="media-left">
            <a href="#">
              <img class="media-object" src="http://lorempixel.com/150/200" alt="...">
            </a>
          </div>
          <div class="media-body">
            <h4 class="media-heading">Media heading</h4>
            <p>Tag</p>
            <p>Tag</p>
            <p>Tag</p>
            <p>Tag</p>
            <p>Tag</p>
            <p>Tag</p>
          </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>

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal2">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <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" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        <div class="row">
          <div class="col-xs-4">
            <img class="img-responsive" src="http://lorempixel.com/250/200" alt="...">
          </div>
          <div class="col-xs-8">
            <p>Tag</p>
            <p>Tag</p>
            <p>Tag</p>
            <p>Tag</p>
            <p>Tag</p>
            <p>Tag</p>
          </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>

Updated with an other exemple

EikiProg
  • 83
  • 9