Flexible Tables Previous | Top | Next

 

A simple flexible table

 

This is a flexible table. This column is flexible.

 


<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
  <TR>
    <TD width="50" bgcolor="#FF6666">
      <IMG src="img/spacer.gif" width="50" height="1" alt=""></TD>
    <TD width="120" bgcolor="#66FF66">
      <IMG src="img/spacer.gif" width="120" height="1" alt=""></TD>
    <TD width="100%" align=left valign=top bgcolor="#CCCCFF">
      <P>This is a flexible table. This column is flexible.</P>
      <P>&nbsp;</P>
    </TD>
    <TD width="40" bgcolor="#666666"><IMG src="img/spacer.gif" width="40" height="1" alt=""></TD>
  </TR>
</TABLE>

 

What happens if you don't include the spacer.gif images? Even with the cell widths set, the fixed-width columns usually collapse:

 

   

This table contains non-breaking spaces rather than spacer.gif images.

 

 

 

  Previous | Top | Next