Basic table html question

Discussion in 'HTML & Website Design' started by bobbyr, Mar 8, 2007.

  1. #1
    I do a simple table with dreamweaver 3 by 3
    <table width="100%" border="0">
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </table>

    How it's possible to have the first row independant... I mean that you can move the column to the first row but the 2 others row dosen't move with the first one. How it's possible?

    Bobby
     
    bobbyr, Mar 8, 2007 IP
  2. humanedited

    humanedited Peon

    Messages:
    747
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't really understand the question. Can you show an example from another site of what you're looking for?
     
    humanedited, Mar 8, 2007 IP
  3. bobbyr

    bobbyr Peon

    Messages:
    232
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah it's not easy to explaine lol... When you have a table 2 column and 3 row and that you move the first colum to have a larger or smaller column the others row follow. But you don't to see the same size in your column for the row 2 and row 3 what you need to do?
     
    bobbyr, Mar 8, 2007 IP
  4. libertygone

    libertygone Active Member

    Messages:
    2,625
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    90
    #4
    you mean something like this??

    ----------------------------------------------


    <table width="200" height="200">
    <tr>
    <td width="100">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </table>
     
    libertygone, Mar 8, 2007 IP
  5. coolguy123

    coolguy123 Guest

    Messages:
    59
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You probably need a table in table.

     
    coolguy123, Mar 8, 2007 IP
  6. bobbyr

    bobbyr Peon

    Messages:
    232
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    nope this want is not what I want :( when you move the columns all the column follow so it's not good...any other idea?
     
    bobbyr, Mar 8, 2007 IP
  7. bacanze

    bacanze Peon

    Messages:
    2,419
    Likes Received:
    127
    Best Answers:
    0
    Trophy Points:
    0
    #7
    do you mean insert widths or padding between each column??


    Remeber, tables should only be used for tabular data, and not laying out pages.
     
    bacanze, Mar 8, 2007 IP
  8. NITRO23456

    NITRO23456 Well-Known Member

    Messages:
    516
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #8
    you need to make a separate table for the first row. SO if it was originally a 3x3 table - make a 1x3 and a 2x3
     
    NITRO23456, Mar 8, 2007 IP
  9. Forrest

    Forrest Peon

    Messages:
    500
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #9
    What you want is colspan. Like merging cells in a spreadsheet.

    Coolguy123 was right, probably you'll need to create a second table inside this merged cell to get the new columns you want.

    You might be able to do one table and then a second underneath it, instead of having to nest one inside the other. Nested tables are a nightmare.

    But then tables really are best used for tabular data. If it's possible to do what you want using CSS and divs, that might be a better option.
     
    Forrest, Mar 8, 2007 IP
  10. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #10
    What you're up to is not possible with a table structure layout unless you go for nested tables which is not the best idea. Howeveer, I would not totally give up on a table layout here. According to the nature of your question, I'd guess a pure CSS layout would kill your time. So I'd consider something like 2 separate tables
    
    
    <table width="100%" border="0">
     <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
     </tr>
    </table>
    
    <table width="100%" border="0">
     <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
     </tr>
    </table>
    Code (markup):
    This way you can set separate width values for the first row which is part of a separate table, therefore independent from the rows below it. That would not be the best option as CSS gurus will say. I do know CSS myself and use it on my projects, but I also believe tabular display isn't the only thing they are goot for.
     
    Clive, Mar 8, 2007 IP
  11. rgchris

    rgchris Peon

    Messages:
    187
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Honestly, I'd suggest solving this with CSS. It's just easier in the long run.
     
    rgchris, Mar 8, 2007 IP
  12. Smith4842

    Smith4842 Active Member

    Messages:
    230
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #12
    You should learn tableless coding. Its better, and faster.
     
    Smith4842, Mar 8, 2007 IP
  13. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #13
    What if he wants it done today? He can always launch his website the easiest way he can, and then pick the css books and study more advanced but better ways of coding a web page.. He can then replace the table design with a css one.. That's what I'd do if I were a newbie.
     
    Clive, Mar 8, 2007 IP
  14. coolguy123

    coolguy123 Guest

    Messages:
    59
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #14
    I agree with Clive, do not spend hours figuring out the tableless layout. And seriously, I think that even if you have tabled layout, it has almost negligible performance hit for an average site. Especially for a newbie, he must not spend hours trying to get divs laid in proper fashion. He should concentrate on getting the site up and running asap. Then if required spend time to switch to tableless layout...
     
    coolguy123, Mar 9, 2007 IP