让swf填充表格的剩余空间
无法找出正确的布局 div,,,
- 我使用一个表格行,其中 3 个单元格作为标题,
- 另一行作为页脚
- ,一行,跨 3 个单元格作为 swf 内容。
我需要我的 swf 占据所有剩余空间,保持其原始宽高比 600x450。当然,表格的宽度和高度都是 100%,而我的 3 colspanned 内容单元格的宽度是 100%。没有 swf 的表工作正常。
问题在于让我的 swf 占据整个高度和高度。单元格的宽度。当然,如果我足够聪明,我会用 div 来完成它,但我认为,在我放弃这个想法并使用表格之后,一切都会很容易。
相反,我的 swf 要么想要非常小,要么填满整个页面。任何帮助表示赞赏。
<table width="100%" height="100%" border="0" align="center" >
<tr height="100 px">
<td width="200"><img src="images/a.png" width="200" height="100" /></td>
<td height="100" align="center"><?>google ad</td>
<td width="200" height="100"><img src="b.png" width="200" height="100" /></td>
</tr>
<tr><td colspan="3">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="myFlashContent" width="100%" height="100%">
<param name="movie" value="swfs/a.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="swfs/a.swf" width="100%" height="100%">
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</td></tr>
<tr><td colspan="3" align="center">footer</td></tr>
</table>
Unable to figure out proper layout divs,,,
- I use a table row with 3 cells for a header,
- another row for a footer,
- and one row, colspanning 3 cells for the swf content.
I need my swf to occupy all remaining space, true to it's original aspect ratio of 600x450. Naturally, the table is 100% width and height, and my 3 colspanned content cell is 100% width. The table without the swf works fine.
The problem lies in getting my swf to occupy the full height & width of the cell. Of course, if I was smart enough, I'd have done it with divs, but I thought that, after I'd dropped that idea and went with a table, that everything would be easy.
Instead, my swf either wants to be very small or fill the entire page. Any help appreciated.
<table width="100%" height="100%" border="0" align="center" >
<tr height="100 px">
<td width="200"><img src="images/a.png" width="200" height="100" /></td>
<td height="100" align="center"><?>google ad</td>
<td width="200" height="100"><img src="b.png" width="200" height="100" /></td>
</tr>
<tr><td colspan="3">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="myFlashContent" width="100%" height="100%">
<param name="movie" value="swfs/a.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="swfs/a.swf" width="100%" height="100%">
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</td></tr>
<tr><td colspan="3" align="center">footer</td></tr>
</table>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用 swfobject 以及 swfobject 提供的高度和宽度属性。我不确定它是否能解决您的确切问题,但至少它应该为您清理一些事情。
您还可以重新考虑将页面放在表格中。
Try using swfobject and the heigh and width attributes provided by swfobject. I'm unsure whether it'll solve your exact problem but at the very least it should clean things up a bit for you.
You might also reconsider laying the page out in a table.