title: Position fixed element in bottom right corner of page with CSS3
body: <p>My page has a max width of 1280px. The body is centered on larger screens using <code>margin: 0 auto;</code> Now I want to place an element in the bottom right corner. That has to be fixed as it should scroll with the content. On screens larger than 1280px the element should stay on the corner of the centered body and not stick to the right side of the window.</p>
  
  <p><strong>The element should stick there, independent of the current viewport width.</strong></p>
  
  <p>I've solved this by using a combination of media-query and CSS3-calc operation. It feels like an overkill for this simple task but I can't find a solution simpler as mine. Here is some sample css (I've changed the maximum page width to 500px here):</p>
  
  <pre><code>body {
      max-width: 500px;
      height: 1000px;
      margin: 0 auto;
      padding: 0;
      border: 1px solid black;
  }
  
  div {
      position: fixed;
      right: 0;
      bottom: 0;
      height: 30px;
      width: 30px;
      margin: 0;
      padding: 0;
      background-color: red;
  }
  
  @media all and (min-width: 515px) /*max body width + (element width / 2)*/ {
      div {    
          margin-right: -webkit-calc((100% - 500px) / 2);
          margin-right: -moz-calc((100% - 500px) / 2);
          margin-right: calc((100% - 500px) / 2);
      }
  }
  </code></pre>
  
  <p>JSFiddle: <a href="https://jsfiddle.net/nh95dc8u/" rel="nofollow">https://jsfiddle.net/nh95dc8u/</a></p>
  
  <p><strong>My JSFiddle shows exactly what I want. I'm just asking if this is possible to achieve with more "standard-CSS" (I'm not really sure about calc across different browsers)? What could be a simpler solution?</strong></p>