View Full Version : positioning layers crossbrowser

07-26-2005, 06:37 PM
I made a Flash site, put it in a layer (1), and added two ads in two other layers (2 and 3). I positioned the second layer below the first layer. It looks right in IE, but in Mozilla and Netscape layer 2 is positioned all the way to the left, as if the left: ..px is not read properly. The html-code is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

<body bgcolor="f6f6f6">

<div id="Layer1" style="position:absolute; z-index:1; 757px; height:799px; left: 27px; top: -50px;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="750" height="782" align="middle">
<param name="movie" value="main.swf">
<param name="quality" value="high"><param name="BGCOLOR" value="F6f6f6">
<embed src="main.swf" width="750" height="782" align="middle" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="F6f6f6"></embed></object>
<div id="Layer2" style=" position:absolute; width:754px; height:115px; z-index:2; left: 37 px; top: 735px;">
<script type="text/javascript"><!--
google_ad_client = "pub-3419211310724703";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_page_url = document.location;
google_color_border = "990000";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "008000";
google_color_text = "000000";
<script type="text/javascript"
<div id="Layer3" style="position:absolute; width:199px; height:840px; z-index:3; left: 786px; top: 10px;">
<script language="JavaScript" src="http://pf.tradedoubler.com/pf/pf?a=1110939&categoryId=321&programs=17513&exclProductIds=9614079,9616228,9617264,9617265,961 7266&xslUrl=http://img.tradedoubler.com/images/xsl/xsl18.xsl&xslParamName1=page&xslParamValue1=0&xslParamName2=pageSize&xslParamValue2=9&maxResults=4&firstResult=0&oe=&js=true" charset=""></script>

I also tried to put layer 2 inside layer 1, but no luck. Does someone know how to make it work crossbrowser?

Thank you very much,


08-23-2005, 02:08 PM
jerryj, which browser versions are you checking on?