flashjordan
asked on
Table over virticly centered SWF movie
I am going crazy, I have a website I am building, where I have a flash movie as the background, with the rest of the content in tables over it. The problem I have is that it is positioned with tdivs and absolute position, which places it ot the left of the browser... I need it centered virticaly. Can anyone help me with this please. Alternatively is there a way to set the SWF a a table background???
Thanks in advance
Thanks in advance
ASKER
Hi,
Attached is the code of the page, problem is I can't get the flash bg to aligh to the center of the browser ass you will see... any help would be fantastic
Attached is the code of the page, problem is I can't get the flash bg to aligh to the center of the browser ass you will see... any help would be fantastic
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<title>SMTV Events :: Thailand</title>
<script src="../SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<link href="Eventstyles.css" rel="stylesheet" type="text/css">
<link href="../SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css">
<style type="text/css">
#div1 {
position: absolute;
center: 0px;
top: 0px;
z-index:1;
width: 800;
height: 800;
}
#div2 {
position: relative;
z-index:3;
}
</style>
</head>
<body>
<div id="div1">
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','width','800','height','800','id','eventmainBG','align','middle','src','flash/eventmainBG','quality','high','wmode','transparent','bgcolor','#ffffff','name','eventmainBG','allowscriptaccess','sameDomain','allowfullscreen','false','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/eventmainBG' ); //end AC code
}
</script>
<noscript>
<center><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="800" height="800" id="eventmainBG" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="flash/eventmainBG.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /> <embed src="flash/eventmainBG.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="800" height="800" name="eventmainBG" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object></center>
</noscript>
</div>
<div id="div2">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="800" height="500" align="center" valign="top"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="800" height="130" align="right" valign="bottom" background="../images/events/smtveventstop2.gif"><table width="345" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="45" align="left" class="mainTXT12">Email </td>
<td width="85" align="left"><input name="textfield2" type="password" id="textfield2" size="10" /></td>
<td width="60" align="left" class="mainTXT12">Password </td>
<td width="95" align="left"><label>
<input name="textfield" type="password" id="textfield" size="10" />
</label></td>
<td width="10" align="left"> </td>
<td width="40" align="left"><img src="../images/events/login.gif" alt="" width="40" height="25" /></td>
<td width="10"> </td>
</tr>
<tr>
<td colspan="7" class="mainTXT12"><img src="../images/events/spacer.gif" width="6" height="6" /></td>
</tr>
</table></td>
</tr>
</table>
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="346" height="519" background="../images/events/smtveventside2.png"> </td>
<td> </td>
</tr>
</table>
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="22" bgcolor="#FF0000"> </td>
<td height="22" bgcolor="#FF6633"> </td>
<td height="22" bgcolor="#FFFF00"> </td>
<td height="22" bgcolor="#00FF00"> </td>
<td height="22" bgcolor="#0099FF"> </td>
<td height="22" bgcolor="#FF00FF"> </td>
</tr>
<tr>
<td height="22" colspan="6"> </td>
</tr>
</table>
<br />
<span class="Copyright9">All Right Reserved By ศูนย์อินเทอร์เน็ตสร้างสรรค์และปลอดภัยเพื่อเยาวชน กระทรวงศึกษาธิการ <br />
27 Lardprao 89 Lardprao Road Wangthonglang Bangkok Thailand 10310 :: Tel. (662) 542 1139 Fax. (662) 542 1805</span><br />
<br />
<img src="../images/events/hazard1.gif" width="800" height="93" /></td>
</tr>
</table>
</div>
</body>
</html>
ASKER
Hi,
I solved it with
<style type="text/css">
#div1 {
position: absolute;
top: 0px;
left: 50%;
right:50%;
z-index:1;
margin-left: -400px;
width:800;
}
#div2 {
position: relative;
z-index:3;
}
</style>
Thanks for your time
I solved it with
<style type="text/css">
#div1 {
position: absolute;
top: 0px;
left: 50%;
right:50%;
z-index:1;
margin-left: -400px;
width:800;
}
#div2 {
position: relative;
z-index:3;
}
</style>
Thanks for your time
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
No.
>> I need it centered virticaly
Post the page code, please.