Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Align Embedded object (.swf) to center?
#1
I've been throwing together a website to put on the back of my school project site in order to load a proxy and a few games for us to play with at school.

So far, here is my progress:
http://eshlads.cwahi.net/Photos/unicorn.php

My question is, how the hell do I align that game in the centre? I've tried all the different alignments dreamweaver shows up, and some of my own made up ones, haha.

This is the code I am currently using to "align" the object:
PHP Code:
<object width="653" height="490" align="middle">
  <
embed src="Unicorn.swf" align="middle"></embed>
</
object

Used:

PHP Code:
<center><object width="653" height="490" align="middle">
  <
embed src="Unicorn.swf" align="middle"></embed>
</
object></center

And it worked fine.
Reply
#2
Is your link still active? Can't seem to open the page.

What I maybe do suggest is to put your <object></object> in a container div and align that center using margin: 0 auto; you have to give it a fixed width though.

Since I can't access your link Sad I can't test before giving you the advise, but please do try that and let me know if it works.
Reply
#3
Code:
<object width="100" height="100" align="center">
<embed src="somefilename.swf" width="100" height="100" align="center">
</embed>
</object>

That should work.
My SMF Modifications:
http://anthony.vibrantvps.com/smf
Reply
#4
Just wrap the object in a div.



PHP Code:
<div align="center">

</
div
[Image: 66202824.jpg]
Reply
#5
ok thanks its usefull
Reply
#6
Put it in a div as Charlie says Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)