Stubborn flash object just won't align to top of table cell!

Discussion in 'HTML & Website Design' started by Kai2810, Feb 14, 2010.

  1. #1
    Hi guys,

    As described, I have trouble getting a flash object to get itself aligned to the top of the table cell it is positioned in. :mad:

    I tried using align parameters in the <TD> tag itself, the <object> tag, set all padding and margins to 0...still doesn't work!

    http://www.thienkaiwei.com/index2.html

    As you can see from the link above, there is a green line there which indicates that the flash object is just not touching the top of the page. I set the TD cell background to green for easier spotting.

    below is the html code. PLEASE ADVICE! Thanks :)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <script language="JavaScript">
    	var message = "Copyright � My Drum School Singapore. All Rights Reserved. "; 
    	function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ 	alert(message); return false; } 
    	if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { 	alert(message); 	return false; } } 
    	document.onmousedown = rtclickcheck;
    </script>
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>My Drum School: We Are Serious About Drumming. [SINGAPORE]</title>
    
    <link href="style.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    <!--
    . {
    padding:0px;
    margin:0px;
    }
    .style21 {
    	font-size: 15px;
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-weight: bold;
    }
    body {
    	background-color: #FF9A00;
    }
    .style37 {
    	font-size: 11px;
    	font-family: Arial, Helvetica, sans-serif;
    }
    .style44 {color: #FF9A00}
    .style20 {color: #000000}
    .style31 {font-size: 14px; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; }
    .style8 {	color: #E87800;
    	margin-bottom: 4px;
    	margin-top: 3px;
    }
    .style34 {color: #535353}
    .style15 {
    	color: #B51C00;
    	font-size: 11px;
    	line-height: 11px;
    	font-family: Tahoma;
    	font-weight: bold;
    }
    .style27 {color: #FFFFFF; font-size: 12px; }
    .style40 {font-size: 12px}
    .style45 {font-size: 6px}
    
    .style46 {color: #282828}
    .style47 {font-family: Verdana, Arial, Helvetica, sans-serif}
    .style49 {
    	color: #000000;
    	font-size: 11px;
    	font-family: Tahoma;
    }
    .style54 {color: #000000; font-weight: bold; }
    
    #flash {
      position: relative; /*or absolute*/
      z-index: 0;
      height: 100%;
      width: 100%;
    } 
    
    -->
    </style>
    </head>
    
    <body>
    <table style="width:100%" border="0" cellspacing="0" cellpadding="0" align="center">
    <!--Start of header section-->
      <tr style="background-color:#4b4b4b;">
        <td valign="top" style="height:100%;background-image: url(images/l.gif); background-repeat: repeat-x;width:50%;"></td><!--Left side of header section-->
        <td style="background-color:#6F0; height:215px;width:766px; vertical-align:top;padding:0px; margin:0px; border:none;" valign="top"><!--Center of header section-->
                        <div id="flash">
                      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width=766 height=215 align="top">
                        <param name="movie" value="flash/flash_index.swf">
                        <param name=quality value=high>
                        <param name="wmode" value="transparent">
                        <embed src="flash/flash_index.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent" width=100%></embed>
                      </object>
                   </div>             
    </td>
       <td style="background-image: url(images/r.gif); background-repeat: repeat-x; height:100%;width:50%;" valign="top"></td><!--Right side of header section-->
       </tr>
    Code (markup):
     
    Kai2810, Feb 14, 2010 IP