views:

239

answers:

1

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">&lt;?&gt;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"&gt;
            <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>
A: 

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.

Evernoob
Swfobject 2, via genswfobject.html gets dimensions, in "%" or "px". The object tag code came directly from swfobject2. I already use height and width, taken directly from swfobject 2.As for tables, as discussed in the original post, and as the included code plainly shows, this is already in a table, in a row, in a cell with nothing else. I need it to expand to fill all remaining space. The table already has specified height and width of 100%. The table works fine.The problem is the swf that doesn't expand to, and only to, the space already given to the cell.
Brian