-
[MX04] Centering my Movie in a Browser
How can I make my flash site centered so that on high resolution screens the movie is in the middle with equal space on the left and right borders but in smaller resolutions it takes up the entire page?
ex: http://www.grenadegloves.com/
-
World Kit Vote Holder
I think that's more of an HTML problem. Place your movie into a table with align set to center and valign set to middle...
-
Senior Member
You don't even need a table. You can place it in a div with align set to center:
<div align="center">
//your flash code...
</div>
-
Senior Member
Another kind of cool thing you can do if you choose to use a table is set a CSS style like this:
Code:
body {
margin:0;
padding:0;
background:#ffffff;
}
table {
width:100%;
height:100%;
}
td {
vertical-align:middle;
text-align:center;
}
That will center your object vertically and horizontally.
-
World Kit Vote Holder
All roads lead to Rome, as you can see
-
Originally Posted by Big 'Un
You don't even need a table. You can place it in a div with align set to center:
<div align="center">
//your flash code...
</div>
ok so what your saying is I need to put my flash site into another program and do this there? What program should I use?
-
You don't need a specialised program to work with HTMl...any text editor can be used. that is, notepad, wordpad, etc....just save the file with the .html or .htm extension.
So if you publish your file from flash and you get a html file, just open up the file and it should look something like this
<html>
<head>
<title>name of flash file</title>
</head>
<body>
////flash code
</body>
</html>
around the flash code put this tag: <center> and afterwards: </center> thats probably the easiest way to center it horizontally on the page but any of the previous suggestions will work.
-
Senior Member
Also, what Abelius wrote is true...
if you want to make the Flash seem to "float" in the center of the browser, you can use a table (with or without css) and center the swf vertically and horizontally that way.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|