View Single Post
Old 03-15-2009, 01:23 PM   PM User | #1
CaptainB
Regular Coder

 
Join Date: Jun 2007
Posts: 805
Thanks: 123
Thanked 23 Times in 23 Posts
CaptainB is an unknown quantity at this point
Swfobject 2 - center flash content problem

Hi guys,

Until resently I used SWFObject 1.5 to display my flash. It worked good, but I decided to try to upgrade to 2.0. But now my flash banner is not centered within the div as it used to be but floats to the left. The banner is rendered to the div "header":

Code:
<script type="text/javascript" src="javascript/simplemarquee.js"></script>
		<script type="text/javascript">
			var params = {};
			params.wmode = "transparent";
			swfobject.embedSWF("flash/headermov.swf", "header", "900", "200", "9.0.0", "flash/expressinstall.swf", params);
		</script>
CSS:
Code:
#header {		margin:0px auto;
				width:900px;
				height:200px;
				text-align:center;
				line-height:200px;
				}
I tried to add the 'align' param, but that didn't seem to have any effect. Does anybody know how to solve this?
CaptainB is offline   Reply With Quote