Problem with creating tables (browser combatability)

  • Thread starter Deleted member 40226
  • Start date
Status
Not open for further replies.
D

Deleted member 40226

Guest
Hi chaps,

I'm working on a new theme for my site, and am having some problems with tables. It works fine in MSIE 6, but in Opera 6 it screws up. You can see it here. Basically, I've got a table, within that table there's another table containing 2 rows. The top row has 3 cells, a left 30 pixel image, a 100% background area with text, and a right 34 pixel image. The row underneath is 3 column spanning cell containing another table with the content. In Opera, the left and right images seem to have some 'padding' to the side of them. I've turned borders on, so you can see what I mean.

This is the offending code in PHP:
Code:
 echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>\n"
  		
        	."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
        	
        		."<tr>"
        			."<td width=\"30\"><img src=\"themes/bendetta/images/menu_left.jpg\"></td>"
        			."<td background=\"themes/bendetta/images/menu_bg.jpg\" width=\"100%\" align=\"center\" valign=\"bottom\"><font class=\"storytitle\"><b>$title</b></font></td>"
        			."<td width=\"34\"><img src=\"themes/bendetta/images/menu_right.jpg\"></td>"
        		."</tr>"
        		
        		."<tr>"
        			."<td colspan=\"3\" bgcolor=\"#323232\">$content</td>\n"
        		."</tr>\n"
        		
        	."</table>"
        	
        ."</td></tr></table>"
        ."
\n\n\n";


Personally, I can see nothing that would cause the problems I'm having, but you guys might be able to shed some light on some dumb thing I've done wrong -- :) --
 
Status
Not open for further replies.