[SWFObject] centering flash content with SWFObject

ascode ascode at dirtysoundsystem.com
Thu Jul 13 02:59:11 PDT 2006


Hi,

Use css to center a flash movie.
A quick mode is: 

<style type="text/css">


/* hide from ie on mac \*/
	html {
		height: 100%;
		overflow: hidden;
	}

	#flashcontent {
    height: 100%;

	}
	/* end hide */
body{
	background:#2c2c2c;
    margin: 0;
	padding: 0;
	font-family: Trebuchet MS,Verdana,Arial,Helvetica,sans-serif;
	font-size: 11px;
	color: #333333;
	height: 100%;
	text-align:center;



}
</style>

This will only center your movie horizontal not vertical
For vertical: define a container css and place the flashcontent div inside
there


-----Original Message-----
From: swfobject-bounces at lists.deconcept.com
[mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of Rick Lecoat
Sent: donderdag 13 juli 2006 11:33
To: SWFObject list
Subject: [SWFObject] centering flash content with SWFObject

Hi;

I'm sure that this has been discussed a zillion times before, but I'm new on
the list and couldn't find the answer in my archives. So here goes...
Can anyone advise me on the best way to centre the flash movie in the
browser window when using SWFObject?

Placing the script blocks into a table cell prevented the JS from locating
the file, because I got the "This text will be replaced" text instead of the
swf.

I'm sure this is SWFObject 101 but if someone could advise me I'd be
grateful.

Cheers;

--
Rick Lecoat


_______________________________________________
SWFObject mailing list
SWFObject at lists.deconcept.com
http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 12/07/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 12/07/2006
 




More information about the Swfobject mailing list