Centering a layout table

Discussion in 'Web Design and Development' started by mynewromantica, Aug 17, 2009.

  1. mynewromantica macrumors regular

    Aug 3, 2009
    I am really new to Dreamweaver and I am working on a personal website. I am using layout tables to create the pages and I want my layout tables to be centered. How do I get them to do that?
  2. Dal123 macrumors 6502a


    Oct 23, 2008
    You need to put two tables ontop of each other/ sort of one in the other. You set one with pixels padding from each side and set the other as a percentage. Only watched a tutuorial on it quickly I'm a complete novice.
    I was going to do this; but looking into it tables are old and obsolete now. It's all done by CSS now. Big subject; I'm currently trying to do that at the moment. :eek:
    I would try to do it by CSS because information in tables is not recognised by search engines (google) so you'll have a very poor rating and hard to get traffic.
  3. angelwatt Moderator emeritus


    Aug 16, 2005
    Google picks up the data from tables, just not as efficiently.
  4. Darth.Titan macrumors 68030


    Oct 31, 2007
    Austin, TX
    Try to avoid table based layouts if you can. That being said...

    You'll need to set a width for your table (either using the table tag's width attribute or in the stylesheet), then in your CSS use
    table {
    margin-left: auto;
    margin-right: auto;
    Note: Won't work with IE5
  5. Dal123 macrumors 6502a


    Oct 23, 2008
    :eek::eek::eek::eek::eek: Sorry :eek::eek::eek::eek::eek:

    So what is the correct way to layout?:confused:
    I'm assuming something with a background but then how do you position that, I have a navbar I'm doing and struggled so much with it; but thanks to angelwatt, Jim, and Nuxx we managed to get my background image to display. That being said; it's 972px wide by 190px high. I want this to centre on the page, to the desired effect of what this original post was if you understand me :eek:.
    Any help appreciated.:p
  6. oli2140 macrumors 6502

    Jan 13, 2008
    And who uses IE5?

Share This Page