title: Create popup with auto width and height
body: <p>Hi,</p>
  
  <p>I want to create a popup whose content will come from outside, which I want to put that content in a iframe tag of popup.I am not sure how much content will come,It will be either large data or small data. So what I want to achieve is, Popup width&amp;height should be auto adjusted to content width and height,and if the content is too large(if it exceeds body width and height), content div tag must be auto scrolled....Is there a way to achieve...code is appreciated...</p>
  
  <p>Here is my code,What I believe would work(But Its not giving proper output)</p>
  
  <pre><code>&lt;style&gt;
   #irmNPopupContainer{
      display:inline-block;
      border:8px solid rgba(0,0,0,0.4);
      border-radius:8px;      
     }
     #irmNPopupHdr{
      height:30px;
      width:100%;
      background:#e4e4e4;
     }
     #irmNPopupHdr span:first-child{
      padding:0px 0px 0px 5px;
      font-weight:bold;
      color:#333333;
     }
     #irmNPopupHdr span:last-child{
      position:absolute;
      right:2px;
      top:2px;
      cursor:pointer;
     }
     #irmNPopupContent iframe{
      width:100%;
      height:100%;
     }
    &lt;/style&gt;
  
   &lt;body&gt;
     &lt;div id="irmNPopupContainer"&gt;
       &lt;div id="irmNPopupHdr"&gt;&lt;span&gt;Agreement Search&lt;/span&gt;&lt;span&gt;&lt;img src="badge_cancel_32.png"&gt;&lt;/span&gt;&lt;/div&gt;
       &lt;div id="irmNPopupContent"&gt;
         &lt;iframe src="http://www.w3schools.com" frameborder=0&gt;
         &lt;/iframe&gt;
       &lt;/div&gt;
     &lt;/div&gt;
   &lt;/body&gt;
  </code></pre>