title: CSS Overflow problems with fixed position divs
body: <p>So this problem has come up and been solved probably 1000 times by now (<a href="https://stackoverflow.com/questions/10154250/scroll-part-of-content-in-fixed-position-container">Scroll part of content in fixed position container</a>, <a href="https://stackoverflow.com/questions/14883794/child-div-height-100-inside-position-fixed-div-overflow-auto">child div height 100% inside position: fixed div + overflow auto</a>) but I can't seem to get my CSS to behave.</p>
  
  <p>I am trying to create a popup div that has a scroll-able interior.  I have a dark grey div that should cover the entire window and centered in the window should be a greenish div.  The inner div needs to have a margin and be sized to fit it's content, unless the content is too big and then it needs a scroll bar.</p>
  
  <p>I can't get the scrolling to work.  I've tried specifying max width/height but those seem to get ignored.</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div class='PopupPanelBG'&gt;
      &lt;div class='PopupPanel'&gt;
          &lt;div&gt;
              &lt;div style='width: 1000px;'&gt;some stuff that is really big&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div
  </code></pre>
  
  <p><strong>CSS:</strong></p>
  
  <pre class="lang-css prettyprint-override"><code>.PopupPanelBG {
      display: table;
      background: rgba(0, 0, 0, 0.7);
      position: fixed;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      z-index: 1000;
      overflow: hidden;
  }
  
  .PopupPanel {
      display: table-cell;
      vertical-align: middle;
      text-align: center;
      position: relative;
      overflow: hidden;
  }
  
  .PopupPanel&gt;div {
      display: inline-block;
      vertical-align: middle;
      text-align: center;
      opacity: 0.9;
      background-color: #e1efbb;
      border: 1px solid gray;
      padding: 8px;
      margin: 30px;
      overflow : auto;
  }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/QbmdK/" rel="nofollow noreferrer">http://jsfiddle.net/QbmdK/</a></p>