title: Center image that is bigger than the screen
body: <p>I attached a drawing of what my page looks like. The page has a width of <code>980px</code> and the image has a width of almost <code>1200px</code>. What I want to achieve is to have the page centered and to show as much of the image as possible while also keeping the image centered. I tried to absolutely position the image but then on mobile devices the browser page is set to the width of the image and the content does not stay centered.   </p>
  
  <p>Basically, there could be screens where not the entire image is shown to the user but only as much as fits the screen.</p>
  
  <p>CSS:  </p>
  
  <pre><code>.page_container {
  width: 980px;
  margin: 0 auto;
  }
  
  .image {
  position: absolute;
  left: 0;
  right: 0;
  }  
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;body&gt;
  &lt;div class="page_container"&gt;...&lt;/div&gt;
  &lt;div class="image"&gt;&lt;img .../&gt;&lt;/div&gt;
  &lt;div class="page_container"&gt;...&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Nt2wK.png" alt="enter image description here"></p>