title: Modal window in absolute center of viewport | Safari and IOS issue
body: <p>I have a problem that's driving me insane, and it has done so for quite some time. I've spent days trying to figure this one out with no success. Google is basically purple to me now. Additionally I fear the answer might be embarrassingly easy - but I'm about to go drown myself so here goes:</p>
  
  <p><strong>The problem:</strong></p>
  
  <p>I use pure css modal windows on my site. They are set to be absolutely positioned using margin: 0 auto; and translateY(-50%); like so:</p>
  
  <pre><code>margin: 0px auto;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  </code></pre>
  
  <p>I am using named anchors to hide/show the modal windows.</p>
  
  <p>This works beautifully in basically every browser - I get the modal windows to appear and disappear like they are supposed to, in the center of the VIEWPORT of my browser window. In Safari and on iPhones and iPads however, it seems my modal windows get absolutely centered relative to the ENTIRE PAGE/DOCUMENT.</p>
  
  <p>So, if my page has a vertical scrollbar, clicking the anchor link and showing the modal window makes the BROWSER WINDOW jump as well - in order to display the modal window in the absolute center of the entire page.</p>
  
  <p>I include my modal windows just before the closing body tag like so:</p>
  
  <pre><code>&lt;?php
  include 'layout/elements/modal/users_online.php';
  include 'layout/elements/modal/requests.php';
  include 'layout/elements/modal/notifications.php';
  include 'layout/elements/modal/messages.php';
  include 'layout/elements/copyright.php';
  include 'layout/elements/modal/developer.php';
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is the code of my modal windows:</p>
  
  <pre><code>.modal {
      display: none;
      position: fixed;
      z-index: 9999;
      width: 100%;
      height: 100%;
      top: 50%;
      left: 0;
      color: #333333;
  }    
  
  .modal:target {
      display: block;
      outline: none;
  }
  
  .modal .big_container {
      width: -webkit-min-content;
      width: -moz-min-content;
      width: min-content;
      width: 785px;
      height: 515px;
      margin: 0px auto;
      -webkit-transform: translateY(-50%);
      -ms-transform: translateY(-50%);
      transform: translateY(-50%);
      padding: 20px;
      background-color: #ffffff;
      box-shadow: 0px 1px 26px -3px #777;
      border-radius: 10px;
      -moz-border-radius: 10px;
      -webkit-border-radius: 10px;
      text-align: center;
  }
  </code></pre>