Code:
<div [red]id="Layer1" style="position:absolute;[/red] width:792px; height:46px; z-index:2; left: 50%; top: 14px; background-color:#FFFFFF; border-left:#000000 1px solid; border-right:#000000 1px solid; border-top:#000000 1px solid;margin-left:-346px;">
<a href="/index.cfm"><img src="/images/Logo.gif" width="237" height="46" border="0"></a>
</div>
<div [red]id="Layer2" style="position:relative;[/red] width:554px; height:200px; z-index:10; [red]top:50%;[/red] left: 42%;">
<object codebase="[URL unfurl="true"]http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"[/URL] width="554" height="200" align="left">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="[URL unfurl="true"]http://127.0.0.1/test.swf">[/URL]
<param name="wmode" value="transparent">
<param name="quality" value="high">
<param name="bgcolor" value=#"FFFFFF">
<embed src="[URL unfurl="true"]http://127.0.0.1/test.swf"[/URL] wmode="transparent" quality="high" width="554" height="200" name="menu" align="left" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="[URL unfurl="true"]http://www.macromedia.com/go/getflashplayer"></embed>[/URL]
</object>
</div>
A couple of questions. I figured how to centre my div blocks, and this works fine. But my question is ,
When I make the first div tag absolute and the second one with the flash movie relative, isnt the second div's position RELATIVE to the first div ? What I mean is shouldnt Layer2 position be relative to Layer1, and Layer2 should move when LAyer 1 does?
I am asking you this is because when I put a top:50% in Layer2 (trying to centre my flash movie in Layer1) IE and Firefox behave diffirently, FireFox works ok cause atleast it doesnt move my movie in the centre of the page(top:50%), but IE on the other hand moves the movie somewhere outside Layer1 in the middle of the page. Do you know how I can align the movie right in the centre for both firefox and IE?