title: How can we center an iframe inside an absolute positionned div
body: <p>I tried to put the <code>iframe</code> tag inside an <code>a</code> tag and set its css to <code>text-align:center</code>, but it didn't work</p>
  
  <p>Edit Sorry, I mislead I have an <code>iframe</code></p>
  
  <pre><code>&lt;div&gt;
      &lt;iframe type="text/html" width="640" height="360" src="https://www.youtube.com/..." frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;
      &lt;button type="button"&gt;Ajouter la vidéo...&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>the <code>div</code> is itself centered and has class </p>
  
  <pre><code>width: 500px;
  position: absolute;
  top: 35%;
  left: 30%;
  margin-left: -200px;
  z-index: 3;
  </code></pre>