title: Centering Embedded Content
body: <p>I am relatively new to web development and my school has asked me to create a webpage that will host the school's webshow and I am having trouble centering the embedded video.</p>
  <p>I tried adding an inline style <code>margin-left: auto; margin-right: auto;</code> to the embed code but that is not centering it. I can change the margins manually but I want the video to be automatically centered whenever somebody visits the page.</p>
  <p>Are auto margins not supported in embed tags?</p>
  <pre><code>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
  &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
  &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
  &lt;head&gt;
  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;SDL.css&quot;&gt;
  &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;
  &lt;title&gt;Home&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;div style=&quot;background-image:url(img/Stage-Background.png)&quot;; margin-top:100px; margin-bottom: 100px;&gt;
  
  &lt;embed
  src=&quot;http://blip.tv/play/AwGUv2w&quot;
  type=&quot;application/x-shockwave-flash&quot; width=&quot;669&quot;
  height=&quot;500&quot; allowscriptaccess=&quot;always&quot;
  allowfullscreen=&quot;true&quot; style=&quot;margin-left:auto; margin-right:auto;&quot;&gt;&lt;/embed&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <hr />
  <p>Working simpler example showing margin style being ignored, at least on Chrome:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>/* does not center it: */
  embed { margin: 0 auto; }
  
  div, embed { border: 1px solid black; }
  div { width: 100%; }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
    &lt;embed src="https://cdn.sstatic.net/stackexchange/Img/se-logo.png"&gt;
  &lt;/div&gt;
    </code></pre>
  </div>
  </div>
  </p>
  <p>On Windows Chrome that renders as:</p>
  <p><a href="https://i.stack.imgur.com/QcuQW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QcuQW.png" alt="enter image description here" /></a></p>