title: How can i position absolutely a div which contains a youtube video with <object> tag in my website?
body: <p>i would like to import a youtube video in my website.</p>
  
  <p>I'm using  the object code as you'll see later on.
  I have two divs. Each of them is positioned absolutely (position:absolute).</p>
  
  <p>My problem is that the div2 which containes the youtube coding ""
   doesn't "obey" to z-index attribute.</p>
  
  <p>I would like the <strong>div2</strong> which <strong>contains the youtube video</strong> *<strong><em>to be overlapped by div1</em>*</strong> which has a z-index: 3 greater than z-index(div2):1.</p>
  
  <p>My code is as follows:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  
  &lt;style type="text/css"&gt;
  
  .div1 {
      width:540px;
      height:400px;
          border:3px solid red;
      position:absolute;
      z-index:3;
  }
  
  .div2 {
      width:540px;
      height:350px;
      border:3px solid blue;
      position:absolute;
      z-index:1;
  }
  
  &lt;/style&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div class="div2"&gt;
  
      &lt;object width="540" height="415" &gt;
       &lt;param name="movie"
           value="http://www.youtube.com/v/NWHfY_lvKIQ?version=3&amp;autohide=1&amp;showinfo=0"&gt;&lt;/param&gt;
      &lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;
      &lt;embed src="http://www.youtube.com/v/NWHfY_lvKIQ?version=3&amp;autohide=1&amp;showinfo=0"
           type="application/x-shockwave-flash"
           allowscriptaccess="always"
           width="540" height="415"&gt;&lt;/embed&gt;
  &lt;/object&gt;
  
  &lt;/div&gt;
  &lt;div class="div1"&gt;
  &lt;/div&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>If you run the example, you 'll see that div2 overlaps div1 and it shouldn't.
  I think that the problem is with the code </p>
  
  <p>How can i solve this problem?Have you ever faced this problem again?</p>
  
  <p>Thanks, in advance</p>