[SWFObject] Relative position
Brian McGill
brian at newcitymedia.com
Tue May 30 06:35:09 PDT 2006
If you set the display as block and define the size, then you can center
it like that. You could position it relative, but there really is no
need to.
try this:
#bazeny-septiky-jimky-nadrze {
margin: 0px auto;
width: 1024px;
height: 768px;
display: block;
}
You can change the size to match your movie and also add the top margin
if you wish.
Jan Kratochvíl, FlashMedia.cz wrote:
> Ok thank you.
> One more q.
> If I use e.g. this:
>
> #bazeny-septiky-jimky-nadrze {
> margin: 0 auto;
> }
>
> than is the position absolute
>
> I tried to center the movie (relative position) for resolution 1024*768 and 1280*1024 like this:
>
> #bazeny-septiky-jimky-nadrze
> {
> margin-top: 100px;
> margin-right: auto;
> margin-bottom: auto;
> margin-left: 15%;
> }
>
> Is it right so?
>
> Regards Jan
>
>
>
>
>
> Message: 2
> Date: Mon, 29 May 2006 15:27:51 -0400
> From: Geoff Stearns <geoff at deconcept.com>
> Subject: Re: [SWFObject] How to insert the movie on the right place
> To: swfobject at lists.deconcept.com
> Message-ID: <831ABF15-9BD1-4146-A27C-D135A316CACD at deconcept.com>
> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed
>
> divs always stretch to 100% of the width of their containing element
> by default, so you'll have to specify a width for that div that holds
> the flash movie.
>
> you could also target the flash movie id and center that if you want to:
>
> #bazeny-septiky-jimky-nadrze {
> margin: 0 auto;
> }
>
>
>
> On May 29, 2006, at 12:19 PM, Jan Kratochv?l, FlashMedia.cz wrote:
>
>
>>> I tried to use SWFObject - it works fine.
>>> I have one problem, I don?t know how to instert the movie e.g. with
>>> right align on my page.
>>>
>>> How can I instert this movie e.g. into table with center align ?
>>>
>>> I tried this code,but it not works the movie has left alignment.
>>> --------------------
>>> <table width="100%" border="0" cellspacing="1" cellpadding="1">
>>> <tr>
>>> <td><div align="center">
>>> <script type="text/javascript">
>>> var so = new SWFObject("bazeny-septiky-jimky-nadrze.swf",
>>> "bazeny-septiky-jimky-nadrze", "785", "400", "8", "#ffffff");
>>>
>>> so.write("flashcontent");
>>> </script>
>>> </div></td>
>>> </tr>
>>> </table>
>>> --------------------
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
--
Brian McGill | New City Media
P:540.552.1320 x211 | F:540.552.5493 | www.newcitymedia.com
More information about the Swfobject
mailing list