Is this possible (simple html table)

Discussion in 'HTML & Website Design' started by x0x, Sep 28, 2009.

  1. #1
    Here we have two rows and three columns. I want to remove the middle column from the second row.


    <table width="500" height="300" border="0" cellpadding="10" >
     
        <td width="150" >&nbsp;</td>
    
        
        <td width="100" >&nbsp;</td>
        <td width="150" >&nbsp;</td>
      </tr>
      
      
      <tr>
      
        <td width="150" >&nbsp;</td>
    
        
        <td width="100" >&nbsp;</td>
        <td width="150" >&nbsp;</td>
    </table>
    HTML:

    What I want:

    [​IMG]


    What I could do myself, and what I don't want:

    [​IMG]

    Is it possible to make it like that?
     
    x0x, Sep 28, 2009 IP
  2. Vozzek

    Vozzek Active Member

    Messages:
    206
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #2
    While this is possible, you'd be better off avoiding tables and using <div> tags with CSS to get the results you want.

    "Nah... I like tables. They're easy."

    I thought so too, and this was my common response when people tried to talk me into using CSS. But you know what? CSS becomes easy too, and it's a LOT more SEO-friendly.
     
    Vozzek, Sep 28, 2009 IP
  3. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #3
    I'm really a html noob, I have only learned php... When it comes to html I'm helpless.

    Could you show me how to get the result I want using the code I posted?
     
    x0x, Sep 28, 2009 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #4
    Presumably, this is for layout rather than for tabular data. I don't believe you can get what you want in a table; it simply defies the logic of a flat database. You could use a separate table for each row. It's ugly, but would work.

    With semantic markup and css, it is trivial. The problems arise with IE6/7, as they don't support css very well. If you want to use a more modern layout method, let us know. Otherwise, try the multiple table.

    cheers,

    gary
     
    kk5st, Sep 28, 2009 IP