Bootstrap modal pushes my jumbotron to left in chrome but not in edge?

Viewed 378

I tried some of the ways in other questions given for bootstrap modal but I am using bootstrap 3.3.7 this shouldn't be the issue ,but I have no idea why this is happening every time I click on button my jumbotron shrinks !!Any help would be appreciated.

My html code:

<div class="jumbotron">
   <div id="post"></div>
   <div id="erase" type="submit" data-toggle="modal" data-target="#myModal1" onclick="erase()">
      <button class="btn btn-default btn-lg" style="border-radius:100%;width:80px;height:80px;padding:15px">
         <img src="/uploads/text.png" style="height:40px;width:40px" />
      </button>
   </div>
</div>

My javascript function:

function erase(){
  $('#post').empty();

  $('#post').html('<div class="modal fade" id="myModal1" role="dialog">'+'<div class="modal-dialog">'+'<div class="modal-content">'+
            '<div class="modal-header">'+'<button type="button" class="close" data-dismiss="modal">&times;</button>'+
            '<h4 class="modal-title" style="font-family:Pangolin">Post your text</h4>'+' </div>'+'<div class="modal-body">'+
            '<div class="media "><div class="media-left"> <form action="porthome_.php" method="post" id="usrform" >'+

          '<div class="form-group"><strong><span class="glyphicon glyphicon-pencil" style="font-size:13px" ></span> Write your post:</strong> <input form="usrform" id="textarea1" type="text" class="form-control" name="image" placeholder="Write something" data-toggle="tooltip" data-placement="top" title="Add the image link from any site,if in doubt check out our videos on how to upload images in post.">'+ 
          '</div>'+
          '<div class="text-right">'+
          '<button type="submit" id="sub"class="btn btn-primary">POST</button>'+
          '</div>'+
          '</form><div class="media-body"> <a href="#"><h5 class="media-heading" style="color:#3369e8"></h5></a>'+
           '</div>'+
           '</div>'+
           '</div>'+'<div class="modal-footer">'+
            '<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>'+'</div>'+
            '</div>'+'</div>'+'</div>');
        }
1 Answers
Related