PDA

View Full Version : vertically center swf file


trippel
04-29-2007, 12:50 PM
Hi all,
This is probably a stupid question, but I can't figure out a way to get this to work! I have a small swf file, (sized 300x237), and I would like it to center itself on my webpage. There's a little piece of code in the embedding script that centers it horizontally (align="middle") but I can't figure out what code to use to center it vertically on the page. I've tried valign="middle" and valign="center", and neither work. But I don't know what else to try, I don't even know what type of script it is. Here is the the part I'm referring to:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="300" height="237" id="index" valign="middle" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="index.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="index.swf" quality="high" bgcolor="#ffffff" width="300" height="237" name="index" valign="center" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

Thanks for your help!

[ paul ferrie ]
04-29-2007, 12:57 PM
Center flash in IE + FF (http://board.flashkit.com/board/showthread.php?t=712057&highlight=center+flash+firefox)

ø
04-29-2007, 06:13 PM
what about placing a center tag before/after the object?!

JoshuaJonah
04-30-2007, 01:51 AM
that wouldn't vertically center

I think your just looking for some vertical and horizonal centering CSS, just slap it in a div.

ø
04-30-2007, 06:47 AM
aw, my bad!

duncanhall
04-30-2007, 06:57 AM
http://www.wpdfd.com/editorial/thebox/deadcentre4.html

[ paul ferrie ]
04-30-2007, 06:59 AM
;2115898']Center flash in IE + FF (http://board.flashkit.com/board/showthread.php?t=712057&highlight=center+flash+firefox)

Does my link not work or something:q::eye: