[SWFObject] Center flash movie in html?

Jud Holliday judh at ZAAZ.com
Mon Sep 25 15:31:56 PDT 2006

Here's an example which will center the content both horizontally and
vertically. You could probably strip out some of the table attributes
and use css for those too, but I just had this handy.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
	<title>Title here</title>
	<script type="text/javascript" src="js/swfobject.js"></script>
<style type="text/css">

html { height: 100%; }
body { 
	height: 100%; 
	margin: 0;	


	<table cellpadding="0" cellspacing="0" border="0" height="100%"
		<td align="center">
			<div id="flashcontent">
				Alternate content here.
			<script type="text/javascript">
				// <![CDATA[
				var so = new
SWFObject("yourfilename.swf", "main", "500", "400", "8", "#FFFFFF",
				// ]]>


-----Original Message-----
From: swfobject-bounces at lists.deconcept.com
[mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of Mike Kaplan
Sent: Monday, September 25, 2006 2:23 PM
To: swfobject at lists.deconcept.com
Subject: [{SPAM?}] - [SWFObject] Center flash movie in html? - Sending
mail server found on relays.ordb.org

How do I go about centering my Flash movie in the html while using  
the SWFObject? I would like to contain it in a div tag if possible.
SWFObject mailing list
SWFObject at lists.deconcept.com

More information about the Swfobject mailing list