View Full Version : Im having trouble positioning a .swf in the center of a table...


rob88wells
04-26-2003, 09:54 AM
Hi,
Im working on the new layout for my upcoming website, its based around a html frame, with a .swf in the center.

I have made the html part fine, you can check it out here. (http://tararao.com/robwell/v4/index.htm)

or: http://tararao.com/robwell/v4/index.htm


I want to display the .swf in the center of the plain blue area, but I can't as there is a line running through the center of it in the table.

If anyone can help me I would be very gratefull, as this is my first major adventure with html.

If you want to help me, you can download the .swf I want to use along with all the images & html.

just click here, (http://tararao.com/robwell/v4/v4.zip) or: http://tararao.com/robwell/v4/v4.zip

The html code for the .swf is:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0"
id="Movie1" width="640" height="340">
<param name="movie" value="Movie1.swf">
<param name="quality" value="high">
<param name="bgcolor" value="#00CCFF">
<embed name="Movie1" src="Movie1.swf" quality="high" bgcolor="#00CCFF"
width="640" height="340"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</embed>
</object>



I would really appreciate some help.

Thanks in advance.

-rob :)

MaGiCSuN
04-26-2003, 12:26 PM
you have dived the middle part into two cells. Well for real you need 3 cells, one for the left image, one for the .swf part and one for the right image :) Use this code instead and replace the bold part with your <object> code:

<html>

<head>
<title>Roberts-Website - v4.0</title>
</head>

<body scroll="no" leftmargin="0" topmargin="0">

<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%" height="100%">
<tr>
<td width="100%" align="center" height="100%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%">
<tr>
<td width="50%" background="http://tararao.com/robwell/v4/images/top-mid.jpg">
<img border="0" src="http://tararao.com/robwell/v4/images/top-left.jpg" align="left" hspace="0" width="82" height="58"></td>
<td width="50%" background="http://tararao.com/robwell/v4/images/top-mid.jpg" align="right">
<img border="0" src="http://tararao.com/robwell/v4/images/top-right.jpg" hspace="0" align="right" width="82" height="58"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%">
<tr>
<td width="8" height="340" bgcolor="#006699">
<img border="0" src="http://tararao.com/robwell/v4/images/vert-left.jpg" align="left" hspace="0" width="8" height="100%"></td>
<td width="100%" height="340" bgcolor="#006699">
<img border="0" src="http://tararao.com/robwell/v4/images/vert-left.jpg" align="left" hspace="0" width="8" height="100%" style="position: absolute; left: 0px;">
<center>YOUR OBJECT IN HERE</center></td><td width="8" height="340" bgcolor="#006699"><img border="0" src="http://tararao.com/robwell/v4/images/vert-right.jpg" align="right" hspace="0" width="8" height="100%"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%">
<tr>
<td width="50%" background="http://tararao.com/robwell/v4/images/botm-mid.jpg">
<img border="0" src="http://tararao.com/robwell/v4/images/botom-left.jpg" align="left" hspace="0" width="82" height="42"></td>
<td width="50%" background="http://tararao.com/robwell/v4/images/botm-mid.jpg">
<img border="0" src="http://tararao.com/robwell/v4/images/botom-right.jpg" align="right" hspace="0" width="82" height="42"></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</body>

</html>

rob88wells
04-26-2003, 01:11 PM
Thanks for that, it helped alot.

I had to make a few changes becuase there were a few extra images I had to fit in, but it all works fine now.

Thanks again.

-rob :D