jb1013
asked on
Center Flash Movie vertically in HTML page (should be easy points)
Here's a link to the page.
http://www.axiscc.com
I'm trying to get the Flash movie to be centered in horizontally AND vertically. I've done this before, but I'm having a brain fart.
Here's the HTML
<body>
<div align="center" valign="middle">
<table width="100%" height="100%" border="0" align="center" valign="middle">
<tr>
<th align="center" valign="middle" scope="col"><object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="600" align="middle">
<param name="movie" value="axis.swf">
<param name="quality" value="high">
<embed src="axis.swf" width="800" height="600" align="middle" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" ></embed>
</object></th>
</tr>
</table>
</div>
</body>
http://www.axiscc.com
I'm trying to get the Flash movie to be centered in horizontally AND vertically. I've done this before, but I'm having a brain fart.
Here's the HTML
<body>
<div align="center" valign="middle">
<table width="100%" height="100%" border="0" align="center" valign="middle">
<tr>
<th align="center" valign="middle" scope="col"><object classid="clsid:D27CDB6E-AE
<param name="movie" value="axis.swf">
<param name="quality" value="high">
<embed src="axis.swf" width="800" height="600" align="middle" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw
</object></th>
</tr>
</table>
</div>
</body>
<div style="vertical-align:cent er">
ASKER
Not sure if I'm using this suggestion correctly, but I haven't been able to get it to work.
<body>
<div style="vertical-align:cent er">
<table width="100%" border="0" align="center">
<tr>
<th align="center" valign="middle" scope="col"><object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="600" align="middle">
<param name="movie" value="axis.swf">
<param name="quality" value="high">
<embed src="axis.swf" width="800" height="600" align="middle" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" ></embed>
</object></th>
</tr>
</table>
</div>
</body>
<body>
<div style="vertical-align:cent
<table width="100%" border="0" align="center">
<tr>
<th align="center" valign="middle" scope="col"><object classid="clsid:D27CDB6E-AE
<param name="movie" value="axis.swf">
<param name="quality" value="high">
<embed src="axis.swf" width="800" height="600" align="middle" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw
</object></th>
</tr>
</table>
</div>
</body>
I'm really sorry. I mean to say <div style="vertical-align:midd le">
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No problem superm401. I actually tried both center and middle with no luck. Currently I have it set to middle, but it's still not aligning correctly..
http://www.axiscc.com
Thanks for offering some assistance.
JB
http://www.axiscc.com
Thanks for offering some assistance.
JB
ASKER
Thanks Sean,
That worked perfectly. I know in previous version of Dreamweaver I did this easily using the GUI tools. For some reason since Dreamweaver MX, whatever I used to do is no longer available or it's moved to a different pallete or something. I'm very GUI orientened but this solution is easy enough for me to code in when needed. Thanks so much.
JB
That worked perfectly. I know in previous version of Dreamweaver I did this easily using the GUI tools. For some reason since Dreamweaver MX, whatever I used to do is no longer available or it's moved to a different pallete or something. I'm very GUI orientened but this solution is easy enough for me to code in when needed. Thanks so much.
JB
Thanks JB, always happy to help out :-)
Sean
Sean
ASKER
Just a note,
I've found that this solution does not render correctly in IE 5.2 for Mac.
If anyone has a solution to fix that let me know.
Thanks,
JB
I've found that this solution does not render correctly in IE 5.2 for Mac.
If anyone has a solution to fix that let me know.
Thanks,
JB
Unfortunately that crash-prone bug-ridden piece of browser junk can't handle any of the ways we use to center content.
However - users of that browser will be used to seeing content at the top of their screen anyways...
Sean
However - users of that browser will be used to seeing content at the top of their screen anyways...
Sean
ASKER
Adding this hack around the CSS helps solve the problem. Mac IE users aren't vertically aligned but at least the full site renders in the browser, and everyone else on a decent browser sees the site like I intended.
/* Hide from IE-Mac \*/
#flash
{
position:absolute;
width:800px;
height:600px;
top:50%;
left:50%;
margin-top:-300px;
margin-left:-400px;
}
/* End hide */
/* Hide from IE-Mac \*/
#flash
{
position:absolute;
width:800px;
height:600px;
top:50%;
left:50%;
margin-top:-300px;
margin-left:-400px;
}
/* End hide */