title: Center an iframe horizontally
body: <p>This piece of code effectively centers the iframes but on their <strong>left</strong> edge not their center.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;html lang="en" xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;Videos&lt;/title&gt;
      &lt;style&gt;
          div.center {
              width: 200px;
              display: block;
              margin-left: auto;
              margin-right: auto;
          }
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body style="background: lightblue"&gt;
      &lt;div class="center"&gt;
          &lt;iframe src="http://www.youtube.com/embed/dgZ-K87NcwQ"&gt;&lt;/iframe&gt;
          &lt;p /&gt;
          &lt;iframe src="http://www.dailymotion.com/embed/video/xoy7jd"&gt;&lt;/iframe&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/sbJXL.png" alt="enter image description here"></p>
  
  <p>I've seen these questions :</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/8366957/how-to-center-an-iframe-horizontally">How to center an iframe horizontally?</a> </li>
  <li><a href="https://stackoverflow.com/questions/10590140/how-do-i-center-the-full-page">how do I center the full page?</a></li>
  <li><a href="https://stackoverflow.com/questions/114543/how-to-center-a-div-in-a-div-horizontally">How to horizontally center a &lt;div&gt; in another &lt;div&gt;?</a></li>
  <li><a href="https://stackoverflow.com/questions/8366957/how-to-center-an-iframe-horizontally">How to center an iframe horizontally?</a></li>
  </ul>
  
  <p>Unfortunately none worked for me.</p>
  
  <p>How would one <em>really</em> center these on the screen ?</p>