# Vertically center swf file

**URL:** https://forum.kirupa.com/t/vertically-center-swf-file/224179
**Category:** Uncategorized
**Created:** [April 29, 2007, 4:50pm UTC](https://forum.kirupa.com/t/vertically-center-swf-file/224179 "2007-04-29T16:50:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![trippel](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trippel/32/3119_2.png) [@trippel](https://forum.kirupa.com/u/trippel)
#### Post date: [April 29, 2007, 4:50pm UTC](https://forum.kirupa.com/t/vertically-center-swf-file/224179/1 "2007-04-29T16:50:42Z")

</div>

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](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](http://www.macromedia.com/go/getflashplayer)” /\>  
\</object\>

Thanks for your help!
