html table border="0" bug??

Discussion in 'HTML & Website Design' started by hobbsy, Aug 28, 2007.

  1. #1
    Hi all
    I have a table width="100%" with 2 rows & 3 columns. I have the first 2 columns a fixed width and the third column to stretch to the edge of the page.

    So I have this simple table

    <table width="100%" border="1" cellpadding="0" cellspacing="0" height="500px">
    <tr>
    <td bgcolor="#00FF00" width="150px">
    </td>
    <td bgcolor="#000000" width="200px">
    </td>
    <td bgcolor="#FF0000">
    </td>
    </tr>
    <tr>
    <td bgcolor="#CC6633" width="150px">
    </td>
    <td bgcolor="#FFFF66" width="200px">
    </td>
    <td bgcolor="#FF33FF">
    </td>
    </tr>
    </table>

    my problem is that I need border="0" but when I do this the fixed width of the columns is ignored and the table goes crazy.

    I'm using explorer and mozilla

    Can anyone find how to fix this because i cant have a border on my table.

    hobbsy
     
    hobbsy, Aug 28, 2007 IP
  2. Noddegamra

    Noddegamra Peon

    Messages:
    1,013
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I tried it and see what you mean. It's because the cells currently have no data in them. Just put some data in (like in the example below) and you will notice it looks fine.

    :)


    <table border="0" cellpadding="0" cellspacing="0" height="500px" width="100%">
    <tr>
    <td bgcolor="#00FF00" width="150px">
    1
    </td>
    <td bgcolor="#000000" width="200px">
    1
    </td>
    <td bgcolor="#FF0000">
    1
    </td>
    </tr>
    <tr>
    <td bgcolor="#CC6633" width="150px">
    1
    </td>
    <td bgcolor="#FFFF66" width="200px">
    1
    </td>
    <td bgcolor="#FF33FF">
    1
    </td>
    </tr>
    </table>
     
    Noddegamra, Aug 28, 2007 IP
  3. hobbsy

    hobbsy Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ha it works...I don't know why but it does, thx heaps that was frustrating me so much
     
    hobbsy, Aug 28, 2007 IP