Setting a div over a flash object

iam tries to put the div menu above the object tag, but still under the object tag in any way to put it above the flash.

<div> <div class='menu'>menu</div> <object width="400" height="40" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"> <param nastatime="SRC" value="bookmark.swf"> <embed src="bookmark.swf" width="400" height="40"></embed> </object> </div> <style> #menu{ width: 100%; clear: both; float: left; position: relative; background: red; z-index: 1111111; } object{ float: left; position: absolute; z-index: -13; } </style> 
+4
source share
2 answers

You need to look at the wmode Flash option when you embed your content. By default, wmode is "window" , which aligns the contents on top of everything else. Set it to "opaque" or "transparent" so that it is properly overlaid.

See http://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html#main_Using_Window_Mode__wmode__values_ for details.

+8
source

You use the class as a menu, but css has #, replace it with .Try this css

  <div class="main"> <div class="menu">menu</div> <div class="fobject"><object width="400" height="40" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"> <param nastatime="SRC" value="bookmark.swf"> <embed src="bookmark.swf" width="400" height="40"></embed> </object> </div> </div>โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹ .main{ position:relative } .menu{ width: 100%; clear: both; float: left; position: relative; background: red; z-index: 100; } .fobject{ float: left; position: relative; z-index: 10; }โ€‹ 
+1
source

Source: https://habr.com/ru/post/1432674/


All Articles