Link to home
Start Free TrialLog in
Avatar of jb1013
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-AE6D-11cf-96B8-444553540000" 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-shockwave-flash"></embed>
       </object></th>
      </tr>
    </table>
</div>
</body>

Avatar of superm401
superm401

<div style="vertical-align:center">
Avatar of jb1013

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:center">
    <table width="100%" border="0" align="center">
      <tr>
        <th align="center" valign="middle" scope="col"><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="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-shockwave-flash"></embed>
        </object></th>
      </tr>
    </table>
</div>
</body>
I'm really sorry.  I mean to say <div style="vertical-align:middle">
ASKER CERTIFIED SOLUTION
Avatar of seanpowell
seanpowell
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jb1013

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
Avatar of jb1013

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
Thanks JB, always happy to help out :-)

Sean
Avatar of jb1013

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
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
Avatar of jb1013

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 */