Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    553
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Table alignment problem, IE vs NS

    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?

    G

    <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 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>
    </TABLE>

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

    Code:
    <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>

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    553
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ah, sure enough, that did the job beautifully. Thanks, MCookie.

    G


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •