html – Make the div block float on top of the object element

Question:

Greetings! I need to make sure that the div block (in this case, the text) is placed on top of the object element, I do this, but nothing happens

#layer {
  z-index: 1;
  position: absolute;
}

#flashob {
  position: relative;
  z-index: 0;
  margin: 0 auto;
}
<div id="layer">
  <h1>text</h1>
</div>
<div id="flashob">
  <object width="600" height="400" classid="clsid:CAFEEFAC-0016-0000-FFFF-ABCDEFFEDCBA" codebase="http://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=6,0,0,0">
        <param name="code" value="com.jscape.ftpapplet.FtpApplet.class">
        <param name="archive" value="client.jar">
        <param name="scriptable" value="false">
        <param name="wmode" value="opaque">
        <embed type="application/x-java-applet;version=1.6" code="com.jscape.ftpapplet.FtpApplet.class" archive="client.jar" name="anyclient-enterprise" width="600" height="400" scriptable="false" pluginspage="http://java.sun.com/products/plugin/index.html#download" wmode="opaque"></embed>
        </object>
</div>

Answer:

#flashob {
  position:relative; 
}

#layer {
  position:absolute; 
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
}
<div id="flashob">
  <object width="600" height="400" classid="clsid:CAFEEFAC-0016-0000-FFFF-ABCDEFFEDCBA" codebase="http://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=6,0,0,0">
    <param name="code" value="com.jscape.ftpapplet.FtpApplet.class">
    <param name="archive" value="client.jar">
    <param name="scriptable" value="false">
    <param name="wmode" value="opaque">
    <embed type="application/x-java-applet;version=1.6" code="com.jscape.ftpapplet.FtpApplet.class" archive="client.jar" name="anyclient-enterprise" width="600" height="400" scriptable="false" pluginspage="http://java.sun.com/products/plugin/index.html#download" wmode="opaque"></embed>
  </object>
  <div id="layer">
    <h1>text</h1>
  </div>
</div>
Scroll to Top