Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML table align="center" valign="middle" problem

Status
Not open for further replies.

buzzboychicago

Programmer
Sep 20, 2004
34
I'm using this code to center a flash object on an html page... (so that no matter how the window resizes it floats in the middle of the window both horizontally and vertically) it is centering it horizontally but valign "middle" doesn't seem to do anything. The ojbect stays glued to the top of the window. Am i doing something wrong? Should I try another method?

 
this the code i have


</style>
</head>
<body bgcolor="#ffffff">
<table align="center" valign="middle" border="0">
<tr>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" width="661" height="495">
<param name="movie" value="Intro.swf">
<param name="quality" value="high">
<embed src="Intro.swf" quality="high" pluginspage=" type="application/x-shockwave-flash" width="661" height="495"></embed>
</object></td>
</tr>
</table>
</body>
</html>
 
That;s because you are aligning the table contents, and not the Cell contents. Use the Valign on the cell that contains the flash object and it should work.

Code:
  <td [red]valign="middle"[/red]><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[URL unfurl="true"]http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"[/URL] width="661" height="495">
      <param name="movie" value="Intro.swf">
      <param name="quality" value="high">
      <embed src="Intro.swf" quality="high" pluginspage="[URL unfurl="true"]http://www.macromedia.com/go/getflashplayer"[/URL] type="application/x-shockwave-flash" width="661" height="495"></embed>
    </object></td>

Ohh and I strongly suggest you look into DIVs, instead of tables fort layout.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top