Centering with CSS with SWFs
We use the same technique of centering, for that if you use SWFObject, we would have the following code to insert a swf with dimensions of 255x140 pixels.
HTML Code:
<html>
<head>
<title> Center with CSS </ title>
<Script src = "swfobject.js" type = "text / javascript"> </ script>
<Style type = "text / css">
# Main {
width: 255px;
height: 140px;
position: absolute;
top: 30%;
left: 30%;
margin-top:-55px;
margin-left:-135px;
}
</ Style>
</ Head>
<body>
<Div id = "main"> </ div>
<Script type = "text / javascript">
var so = new SWFObject ("7762.swf", "id", "255", "140", "9", "# FFF");
so.write ("main");
</ Script>
</ Body>
</ Html>
You see very simple and is compatible with most browsers. So you can use any browser, according to your choice.
Bookmarks