View Full Version : Table alignment problem, IE vs NS

06-30-2002, 06:44 PM
With the table below, I want the first 3 elements on the left to be the precise specified, and then I want the right aligned last element to fill out the rest of the width of the display to 100%. This works in IE, but NS expands the left elements, contrary to what I want. Is there a way to code this so that NS renders it the same as ie, with the first 3 elements on the left sized as specified?


<TR BGCOLOR=ffffff height=75>
<TD border=0 height=75 width=62><IMG SRC="topl009.jpg" WIDTH=62 HEIGHT=75 border=0></TD>
<TD border=0 WIDTH=214><IMG SRC="walshlog6_01.gif" WIDTH=214 HEIGHT=75 border=0></TD>
<TD height=75 width=128 align=left colspan=2 BGCOLOR=005e00><IMG SRC="ltop14.jpg" WIDTH=121 HEIGHT=75 border=0></TD>
<TD BGCOLOR=005e00><IMG src="1pix.gif" BORDER=0></TD>
<TD ALIGN=right BGCOLOR=005e00><a href="direct.html"><IMG SRC="ltop6.jpg" WIDTH=214 HEIGHT=75 BORDER=0 ></a><img src="1pix.gif" height="1" width="5"></TD></TR>

06-30-2002, 07:35 PM
Hi, gorilla,
first; don't use the colspan attribute if there's no other row with those cells in it. It makes most browsers render your table wrong.
If you leave that out, give the second cell from the right a width="1" and the right cell a width of 100%.. well, that'll work most of the time. Building flexible tables can be tricky.

<TABLE border=1 cellpadding=0 cellspacing=0 width="100%" bgcolor=ffffff>
<TR bgcolor=ffffff height=75>
<TD border=0 height=75 width=62><IMG src="topl009.jpg" width=62 height=75 border=0></TD>
<TD border=0 width=214><IMG src="walshlog6_01.gif" width=214 height=75 border=0></TD>
<TD height=75 width=128 align=left bgcolor=005e00><IMG src="ltop14.jpg" width=121 height=75 border=0></TD>
<TD bgcolor=005e00 width="1"><IMG src="1pix.gif" border=0></TD>
<TD align=right bgcolor=005e00 width="100%"><A href="direct.html"><IMG src="ltop6.jpg" width=214 height=75 border=0 ></A><IMG src="1pix.gif" height="1" width="5"></TD></TR> </TABLE>

06-30-2002, 08:13 PM
Ah, sure enough, that did the job beautifully. Thanks, MCookie.