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 10 of 10

Thread: Table Spacing?

  1. #1
    New Coder
    Join Date
    May 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Table Spacing?

    I am not exact on what this is called so it did me no good to look it up. But what I want to know is how do I make a little table inside of a larger table. You see websites with them all of the time, like DeviantART and Cubix, my question is how is it done?

    I am wanting to have a basic set up for a new site I am working on, header, footer, content in the middle and on the right two little boxes. Boxes that can hold extra links and affiliates. They would have a space between them and the content of the page but I am not sure how to do this.

    When I set up the table and think I have it right, the content area, when stretched vertically also stretches the two side tables vertically and it is frustrating.

    I have a few examples of what I am talking about and evern a rough sketch of what I want the website to look like I'd that would help.

    Here is an example from DeviantART.com...


    There is s space between the side menu and the content area, how would I obtain this effect and how would I keep the vertical stretching of the main content from stretching the side menus?

    Here is another example from MYCubix


    How could I obtain this without interfering with the rest of the table(s)?

    And finally a link to a poorly drawn and low quality sketch of what ia m roughly wanting. As you can see there are little menus on the right, how would I make those and not have them certically stretched by the content area?

    Rough Sketch

    I hope I explained myself well. lol

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Location
    engoku no anime
    Posts
    354
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You would use table nesting:
    Code:
    <table>
      <tr>
        <td>
          <table>
            <tr>
              <td>(Begin the first table)</td>
              ..........
            </tr>
          </table>
        </td>
        <td>
          <table>
            <tr>
              <td>(Begin the second table)</td>
              ..........
            </tr>
          </table>
        </td>
      </tr>
    </table>
    That's for something like DeviantART where the tables are side by side.
    To make them on top of each other, you would put them in separate tables:
    Code:
    <table>
      <tr>
        <td>(Begin the first table)</td>
        ..........
      </tr>
    </table>
    <table>
      <tr>
        <td>(Begin the second table)</td>
        ..........
      </tr>
    </table>
    or separate rows within the container table:
    Code:
    <table>
      <tr>
        <td>
          <table>
            <tr>
              <td>(Begin the first table)</td>
              ..........
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td>
          <table>
            <tr>
              <td>(Begin the second table)</td>
              ..........
            </tr>
          </table>
        </td>
      </tr>
    </table>
    Last edited by gohankid77; 10-14-2004 at 06:32 AM.

  • #3
    New Coder
    Join Date
    May 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Wow, thank you so much. Is there anything else you can explain to me, or would it be a good idea to search around for "table nesting" to get more information and tips.

    I printed your post for reference. lol You have been extremely helpful to me.

  • #4
    Regular Coder
    Join Date
    Jul 2004
    Location
    engoku no anime
    Posts
    354
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well . . . . Table nesting can get pretty bad when you want to update a page and change the look of the table. It isn't very highly recommended, but it does have its uses. I rarely use tables, and I have never nested tables, so I don't really care much for them since CSS works better for me.

  • #5
    New Coder
    Join Date
    May 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well this is my first time ever needing anything like this and I am not good with CSS. lol

  • #6
    Regular Coder
    Join Date
    Jul 2004
    Location
    engoku no anime
    Posts
    354
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Learn CSS during your free time and it'll be well worth it. It takes a while to figure out how certain properties interact with each other, but once you get it, it gets considerably easier. All you need is a basic reference, an advanced guide/reference, and a lot of experimentation.

    I'm glad I could help. Anytime you have a question that you can't solve after searching on the Web and in these forums, feel free to post.

  • #7
    New Coder
    Join Date
    May 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Alright, I will definatly start looking into CSS more, can you suggest any good references?

  • #8
    Regular Coder
    Join Date
    Jul 2004
    Location
    engoku no anime
    Posts
    354
    Thanks
    0
    Thanked 0 Times in 0 Posts
    W3Schools CSS Tutorial is a good start for a beginner.

    The W3C CSS2.1 Candidate Recommendation would be next (ideally). There is a lot at W3.org that the W3C explains in great TECHNICAL detail. In other words, you'll get a whole new vocabulary! You could probably find some more tutorials online.

    /* PIE */ is a good reference for browser hacks (you'll run into them quite often when coding for more than one browser). It also has some CSS tutorial links.

    A List Apart has some interesting and quite useful information.

    That should keep you busy for a while!

  • #9
    New Coder
    Join Date
    May 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am sure it will, thank you for all of your help.

  • #10
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reading

    Also check out the "HTML & CSS Documentation" sticky at the top of this forum.
    If you like reading, nothing beats "Cascading Style Sheets: The Definitive Guide, Second Edition" by Eric Meyer.
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

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