table formatting in html

Sharky Forums


Results 1 to 4 of 4

Thread: table formatting in html

Threaded View

  1. #1
    Hammerhead Shark
    Join Date
    Feb 2001
    Posts
    1,612

    table formatting in html

    here's what i'm trying to accomplish:

    Code:
    ---------------------------------
    |                        |      |
    |                        |      |
    +-----+------------------+------+
    |     |                         |
    |     |                         |
    +-----+------------------+------+
    |                        |      |
    |                        |      |
    ---------------------------------
    that is, a three-column table, but one of the cells (either on the right or left, alternating) takes up two of them. The middle cell should be the largest. The small cell should only contain a small picture.

    here's what I'm doing right now:
    Code:
    <TABLE BORDER=0 CELLSPACING=10>
    <COL WIDTH="10%">
    <COL WIDTH="80%">
    <COL WIDTH="10%">
    <TR>
    	<TD COLSPAN=2>blah blah blah...
    	<TD><img ...>
    but having the percents seems like a bad way to do it, because it might not work as well on different resolutions. Is there any way to get it to just reserve enough space for columns 1+3 to hold the pictures? I bet I could specify them directly:
    Code:
    <TABLE BORDER=0 CELLSPACING=10>
    <COL WIDTH=100>
    <COL>
    <COL WIDTH=100>
    <TR>
    	<TD COLSPAN=2>blah blah blah...
    	<TD><img ...>
    but then if I use different sized pictures, i have to manually change the column widths.

    EDIT: NEVERMIND THAT DOESN'T WORK.. I HATE THIS !!
    It seems to want to reserve all the space it can for column 3, even though it would work perfectly to only make it 100 pixels wide.

    EDIT AGAIN: THIS IS RETARDED
    Code:
    <TABLE BORDER=0 CELLSPACING=10>
    <COL WIDTH=116>
    <COL WIDTH=400>
    <COL WIDTH=116>
    <TR>
    	<TD COLSPAN=2>blah blah blah...
    	<TD><img ...>
    you'd think that would make column 1 116 pixels wide, column 2 400 pixels wide, and column 3 116 pixels wide.. but it DOESN'T!! not in IE anyway! (netscape works fine...) In IE, I get a 116-pixel column, then probably a 0-width column, and finally another column that's, maybe, 516 pixels wide! what is going on???
    Last edited by Strogian; 02-11-2004 at 10:56 AM.

Posting Permissions

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