title: Can't center react component on the screen
body: <p>I have a modal window, which opens on the click of the user. I am trying to center it and use standard CSS code:</p>
  
  <pre><code>.layout: {
      position: "absolute";
      left: "50%";
      top: "50%";
  }
  </code></pre>
  
  <p>But it centers element inside its parent, and I don't know why, because a parent has static position (so absolute should count from the edge of the screen, not a parent). How to fix it? 
  Here is the structure of a modal window:</p>
  
  <pre><code>&lt;div class="layout"&gt;
      &lt;div class="window"&gt;
          &lt;!--some code --!&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>