开发者

Positioning and Sizing a Flash Element Properly in a Div

Here is the code I'm using for the div in question (which is the 3rd box of the javascript dynamic box):

<div class="contentdiv" style="margin:-20px 0 10px -30px;">
<object height="100%" cellSpacing="0" cellPadding="0">
<param name="movie" value="images/tri.swf">
<embed src="images/tri.swf" height="100%" align=top cellSpacing="0" cellPadding="0"> 
</embed>
</object>
<开发者_如何学JAVA;/div>

Apparently all this .swf is supposed to do is be a countdown for the numbers in the stopwatch.

I want the .swf graphic to fit the div just like the image in box #5 does.

Right now I can't get it to be either the proper size or the proper alignment. I'm admittedly not a Flash expert, so any clues would be great here.

Also, other stuff on the page is totally broken because this is just the "dev" version of the site where I test stuff out. So hopefully that can all be ignored.


I might be missing what you are asking, but all you should need to do is just set a height and width on both the embed and object tags to be the height and width you want. The following uses a width of 50px and a height of 40px, but remember to omit the px when declaring it:

<div class="contentdiv" style="margin:-20px 0 10px -30px;">
    <object height="40" width="50">
    <param name="movie" value="images/tri.swf">
    <embed src="images/tri.swf" height="40" width="50" align="top"> 
    </embed>
    </object>
</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜